After the update to v3.35, `dart analyze` has reported some "problems" which were identfied by the diagnostic. Fixed problems which had associated fixes by running `dart fix`.
Signed-off-by: Shan Shaji <[email protected]> --- lib/main.dart | 4 ++-- lib/utils/validators.dart | 8 ++++---- lib/widgets/pve_bridge_selector_widget.dart | 2 +- lib/widgets/pve_guest_backup_widget.dart | 4 ++-- lib/widgets/pve_guest_migrate_widget.dart | 2 +- lib/widgets/pve_guest_os_selector_widget.dart | 2 +- lib/widgets/pve_network_model_selector.dart | 2 +- lib/widgets/pve_storage_selector_widget.dart | 2 +- lib/widgets/pve_task_log_widget.dart | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 0ffcae7..7328057 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -112,7 +112,6 @@ class MyApp extends StatelessWidget { surfaceContainer: ProxmoxColors.supportGreyTint75, onSurfaceVariant: Colors.black, ), - indicatorColor: ProxmoxColors.orange, textButtonTheme: TextButtonThemeData( style: TextButton.styleFrom(foregroundColor: ProxmoxColors.grey), ), @@ -135,6 +134,7 @@ class MyApp extends StatelessWidget { selectionHandleColor: ProxmoxColors.orange, cursorColor: ProxmoxColors.orange, ), + tabBarTheme: TabBarThemeData(indicatorColor: ProxmoxColors.orange), ), darkTheme: ThemeData( colorScheme: ColorScheme.fromSeed( @@ -151,7 +151,6 @@ class MyApp extends StatelessWidget { surfaceContainer: ProxmoxColors.grey, onSurfaceVariant: ProxmoxColors.supportGreyTint75, ), - indicatorColor: ProxmoxColors.orange, // flutter has a weird logic where it pulls colors from different // scheme properties depending on light/dark mode, avoid that... appBarTheme: const AppBarTheme( @@ -178,6 +177,7 @@ class MyApp extends StatelessWidget { selectionHandleColor: ProxmoxColors.orange, cursorColor: ProxmoxColors.orange, ), + tabBarTheme: TabBarThemeData(indicatorColor: ProxmoxColors.orange), ), builder: (context, child) { return StreamListener( diff --git a/lib/utils/validators.dart b/lib/utils/validators.dart index 9c2d859..fa4bf95 100644 --- a/lib/utils/validators.dart +++ b/lib/utils/validators.dart @@ -12,19 +12,19 @@ class Validators { static final RegExp _ipv4RegExp = RegExp("^(?:(?:(?:$ipv4Octet\\.){3}$ipv4Octet))\$"); - static isValidEmail(String email) { + static bool isValidEmail(String email) { return _emailRegExp.hasMatch(email); } - static isValidPassword(String password) { + static bool isValidPassword(String password) { return _passwordRegExp.hasMatch(password); } - static isValidDnsName(String name) { + static bool isValidDnsName(String name) { return _dnsExp.hasMatch(name); } - static isValidIPV4(String ip) { + static bool isValidIPV4(String ip) { return _ipv4RegExp.hasMatch(ip); } } diff --git a/lib/widgets/pve_bridge_selector_widget.dart b/lib/widgets/pve_bridge_selector_widget.dart index dcf5890..9d29e98 100644 --- a/lib/widgets/pve_bridge_selector_widget.dart +++ b/lib/widgets/pve_bridge_selector_widget.dart @@ -41,7 +41,7 @@ class PveBridgeSelector extends StatelessWidget { ], onChanged: (PveNodeNetworkModel? selection) => bBloc.events.add(BridgeSelectedEvent(selection)), - value: state.value, + initialValue: state.value, autovalidateMode: AutovalidateMode.onUserInteraction, validator: (dynamic _) { return state.errorText; diff --git a/lib/widgets/pve_guest_backup_widget.dart b/lib/widgets/pve_guest_backup_widget.dart index 7bd38d4..4966e9d 100644 --- a/lib/widgets/pve_guest_backup_widget.dart +++ b/lib/widgets/pve_guest_backup_widget.dart @@ -545,7 +545,7 @@ class _PveBackupFormState extends State<PveBackupForm> { onChanged: (PveVZDumpModeType? selection) => setState(() { mode = selection; }), - value: mode, + initialValue: mode, autovalidateMode: AutovalidateMode.onUserInteraction, ); } @@ -566,7 +566,7 @@ class _PveBackupFormState extends State<PveBackupForm> { onChanged: (PveVZDumpCompressionType? selection) => setState(() { compression = selection; }), - value: compression, + initialValue: compression, autovalidateMode: AutovalidateMode.onUserInteraction, ); } diff --git a/lib/widgets/pve_guest_migrate_widget.dart b/lib/widgets/pve_guest_migrate_widget.dart index c57ee22..cb6cd38 100644 --- a/lib/widgets/pve_guest_migrate_widget.dart +++ b/lib/widgets/pve_guest_migrate_widget.dart @@ -200,7 +200,7 @@ class _MigrateTargetSelector extends StatelessWidget { migrateBloc.events .add(MigrationTargetChanged(selectedNode)); }, - value: state.selectedNode?.nodeName, + initialValue: state.selectedNode?.nodeName, isExpanded: true, ), ); diff --git a/lib/widgets/pve_guest_os_selector_widget.dart b/lib/widgets/pve_guest_os_selector_widget.dart index b9f83a8..2b3bd82 100644 --- a/lib/widgets/pve_guest_os_selector_widget.dart +++ b/lib/widgets/pve_guest_os_selector_widget.dart @@ -31,7 +31,7 @@ class PveGuestOsSelector extends StatelessWidget { onChanged: (choice) { gBloc.events.add(ChangeOsType(choice)); }, - value: snapshot.data?.value, + initialValue: snapshot.data?.value, validator: (_) => snapshot.data?.errorText, autovalidateMode: AutovalidateMode.onUserInteraction, ); diff --git a/lib/widgets/pve_network_model_selector.dart b/lib/widgets/pve_network_model_selector.dart index 31c8d34..6e77e52 100644 --- a/lib/widgets/pve_network_model_selector.dart +++ b/lib/widgets/pve_network_model_selector.dart @@ -46,7 +46,7 @@ class _PveNetworkInterfaceModelSelectorState }); widget.onChange!(selection); }, - value: selection ?? widget.initialSelection, + initialValue: selection ?? widget.initialSelection, ); } } diff --git a/lib/widgets/pve_storage_selector_widget.dart b/lib/widgets/pve_storage_selector_widget.dart index 66d4a33..0cac29e 100644 --- a/lib/widgets/pve_storage_selector_widget.dart +++ b/lib/widgets/pve_storage_selector_widget.dart @@ -66,7 +66,7 @@ class PveStorageSelectorDropdown extends StatelessWidget { .add(StorageSelectedEvent(storage: selectedStorage)), selectedItemBuilder: (context) => state.storages.map((item) => Text(item.id)).toList(), - value: state.selected, + initialValue: state.selected, autovalidateMode: AutovalidateMode.onUserInteraction, validator: (dynamic value) { if (state.errorMessage.isNotEmpty) { diff --git a/lib/widgets/pve_task_log_widget.dart b/lib/widgets/pve_task_log_widget.dart index 292e499..5e9e733 100644 --- a/lib/widgets/pve_task_log_widget.dart +++ b/lib/widgets/pve_task_log_widget.dart @@ -94,7 +94,7 @@ class _PveTaskLogState extends State<PveTaskLog> { ), DropdownButtonFormField<String>( decoration: const InputDecoration(labelText: 'Source'), - value: state.source, + initialValue: state.source, icon: const Icon(Icons.arrow_downward), iconSize: 24, elevation: 16, -- 2.47.2 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
