From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve_flutter_frontend 1/4] fix: run `dart fix` to fix the problems identified by diagnostic
Date: Wed, 24 Sep 2025 12:36:22 +0200 [thread overview]
Message-ID: <20250924103625.144589-2-s.shaji@proxmox.com> (raw)
In-Reply-To: <20250924103625.144589-1-s.shaji@proxmox.com>
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 <s.shaji@proxmox.com>
---
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
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-09-24 10:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 10:36 [pve-devel] [PATCH pve_flutter_frontend 0/4] fix: add fix for dart-analyze issues and replace deprecated APIs Shan Shaji
2025-09-24 10:36 ` Shan Shaji [this message]
2025-09-24 10:36 ` [pve-devel] [PATCH pve_flutter_frontend 2/4] cleanup: dart-analyze: add explicit type annotation Shan Shaji
2025-09-24 10:36 ` [pve-devel] [PATCH pve_flutter_frontend 3/4] fix: dart-analyze: remove deprecated props and use `RadioGroup` Shan Shaji
2025-09-24 10:36 ` [pve-devel] [PATCH pve_flutter_frontend 4/4] chore: add upper bound flutter constraint and update dart sdk constraint Shan Shaji
2025-09-26 9:25 ` Dominik Csapak
2025-09-26 9:25 ` [pve-devel] partially applied: [PATCH pve_flutter_frontend 0/4] fix: add fix for dart-analyze issues and replace deprecated APIs Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250924103625.144589-2-s.shaji@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.