Code improvements

This commit is contained in:
Juan Gilsanz Polo
2025-04-03 22:26:14 +02:00
parent 7982644c23
commit 93ebb1de40
17 changed files with 114 additions and 107 deletions

View File

@@ -208,14 +208,14 @@ class _ConnectForm extends ConsumerWidget {
onPressed: provider.testConnection == null ? () => ref.read(connectProvider.notifier).testConnection() : null,
style: ButtonStyle(
foregroundColor: provider.testConnection == LoadStatus.loaded
? const MaterialStatePropertyAll(Colors.green)
? const WidgetStatePropertyAll(Colors.green)
: provider.testConnection == LoadStatus.error
? const MaterialStatePropertyAll(Colors.red)
? const WidgetStatePropertyAll(Colors.red)
: null,
backgroundColor: provider.testConnection == LoadStatus.loaded
? MaterialStatePropertyAll(Colors.green.withOpacity(0.15))
? WidgetStatePropertyAll(Colors.green.withOpacity(0.15))
: provider.testConnection == LoadStatus.error
? MaterialStatePropertyAll(Colors.red.withOpacity(0.15))
? WidgetStatePropertyAll(Colors.red.withOpacity(0.15))
: null,
),
child: Row(