From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 19A971FF183 for ; Wed, 24 Sep 2025 12:36:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C06A22574; Wed, 24 Sep 2025 12:37:15 +0200 (CEST) From: Shan Shaji To: pve-devel@lists.proxmox.com Date: Wed, 24 Sep 2025 12:36:22 +0200 Message-ID: <20250924103625.144589-2-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250924103625.144589-1-s.shaji@proxmox.com> References: <20250924103625.144589-1-s.shaji@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758710185710 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.143 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve_flutter_frontend 1/4] fix: run `dart fix` to fix the problems identified by diagnostic X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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 --- 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 { onChanged: (PveVZDumpModeType? selection) => setState(() { mode = selection; }), - value: mode, + initialValue: mode, autovalidateMode: AutovalidateMode.onUserInteraction, ); } @@ -566,7 +566,7 @@ class _PveBackupFormState extends State { 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 { ), DropdownButtonFormField( 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 pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel