From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox_login_manager v2] refactor: rename `MaterialState` to `WidgetState`
Date: Thu, 22 May 2025 09:58:12 +0200 [thread overview]
Message-ID: <20250522075812.18467-1-s.shaji@proxmox.com> (raw)
This commit applys the `dart fix` command to fix all the dart
analysis issues associated with renaming `MaterialState` to
`WidgetState`.
According to the flutter official docs [0] the `MaterialState` and it's
related APIs have been moved out of the material library and renamed to
`WidgetState`. The behaviour of the two are the same.
- [0] https://docs.flutter.dev/release/breaking-changes/material-state
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
changes since v1:
* Removed all changes that were not part of `dart fix`
lib/proxmox_login_form.dart | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart
index 735bd42..312ffb6 100644
--- a/lib/proxmox_login_form.dart
+++ b/lib/proxmox_login_form.dart
@@ -257,46 +257,46 @@ class _ProxmoxLoginPageState extends State<ProxmoxLoginPage> {
secondary: ProxmoxColors.orange,
onSecondary: ProxmoxColors.supportGrey),
checkboxTheme: CheckboxThemeData(
- fillColor: MaterialStateProperty.resolveWith<Color?>(
- (Set<MaterialState> states) {
- if (states.contains(MaterialState.disabled)) {
+ fillColor: WidgetStateProperty.resolveWith<Color?>(
+ (Set<WidgetState> states) {
+ if (states.contains(WidgetState.disabled)) {
return null;
}
- if (states.contains(MaterialState.selected)) {
+ if (states.contains(WidgetState.selected)) {
return ProxmoxColors.orange;
}
return null;
}),
),
radioTheme: RadioThemeData(
- fillColor: MaterialStateProperty.resolveWith<Color?>(
- (Set<MaterialState> states) {
- if (states.contains(MaterialState.disabled)) {
+ fillColor: WidgetStateProperty.resolveWith<Color?>(
+ (Set<WidgetState> states) {
+ if (states.contains(WidgetState.disabled)) {
return null;
}
- if (states.contains(MaterialState.selected)) {
+ if (states.contains(WidgetState.selected)) {
return ProxmoxColors.orange;
}
return null;
}),
),
switchTheme: SwitchThemeData(
- thumbColor: MaterialStateProperty.resolveWith<Color?>(
- (Set<MaterialState> states) {
- if (states.contains(MaterialState.disabled)) {
+ thumbColor: WidgetStateProperty.resolveWith<Color?>(
+ (Set<WidgetState> states) {
+ if (states.contains(WidgetState.disabled)) {
return null;
}
- if (states.contains(MaterialState.selected)) {
+ if (states.contains(WidgetState.selected)) {
return ProxmoxColors.orange;
}
return null;
}),
- trackColor: MaterialStateProperty.resolveWith<Color?>(
- (Set<MaterialState> states) {
- if (states.contains(MaterialState.disabled)) {
+ trackColor: WidgetStateProperty.resolveWith<Color?>(
+ (Set<WidgetState> states) {
+ if (states.contains(WidgetState.disabled)) {
return null;
}
- if (states.contains(MaterialState.selected)) {
+ if (states.contains(WidgetState.selected)) {
return ProxmoxColors.orange;
}
return null;
--
2.39.5 (Apple Git-154)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-05-22 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 7:58 Shan Shaji [this message]
2025-06-04 10:00 ` [pve-devel] applied: " 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=20250522075812.18467-1-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal