all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve_flutter_frontend 3/4] fix: dart-analyze: remove deprecated props and use `RadioGroup`
Date: Wed, 24 Sep 2025 12:36:24 +0200	[thread overview]
Message-ID: <20250924103625.144589-4-s.shaji@proxmox.com> (raw)
In-Reply-To: <20250924103625.144589-1-s.shaji@proxmox.com>

Starting from flutter v3.32 [0] the `groupValue` and `onChanged` has
been deprecated from `RadioListTile` and need to use `RadioGroup`
widget. Fixed the issue by wrapping the group of `RadioListTile`
widgets with `RadioGroup` [1].

- [0] http://api.flutter.dev/flutter/material/RadioListTile/groupValue.html
- [1] https://api.flutter.dev/flutter/widgets/RadioGroup-class.html

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/widgets/pve_cd_selector_widget.dart | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lib/widgets/pve_cd_selector_widget.dart b/lib/widgets/pve_cd_selector_widget.dart
index d1f260e..b4591d0 100644
--- a/lib/widgets/pve_cd_selector_widget.dart
+++ b/lib/widgets/pve_cd_selector_widget.dart
@@ -22,12 +22,13 @@ class PveCdSelector extends StatelessWidget {
         builder: (context, snapshot) {
           if (snapshot.hasData) {
             final state = snapshot.data!;
-            return Column(children: [
+            return RadioGroup(
+              groupValue: state.value,
+              onChanged: (value) => cdBloc.events.add(ChangeValue(value)),
+              child: Column(children: [
               RadioListTile<CdType>(
                 title: const Text('Use CD/DVD disc image file (iso)'),
                 value: CdType.iso,
-                groupValue: state.value,
-                onChanged: (value) => cdBloc.events.add(ChangeValue(value)),
               ),
               if (state.value == CdType.iso)
                 OutlinedButton(
@@ -63,16 +64,12 @@ class PveCdSelector extends StatelessWidget {
               RadioListTile<CdType>(
                 title: const Text('Use physical CD/DVD Drive'),
                 value: CdType.cdrom,
-                groupValue: state.value,
-                onChanged: (value) => cdBloc.events.add(ChangeValue(value)),
               ),
               RadioListTile<CdType>(
                 title: const Text('Do not use any media'),
                 value: CdType.none,
-                groupValue: state.value,
-                onChanged: (value) => cdBloc.events.add(ChangeValue(value)),
               ),
-            ]);
+            ]));
           }
 
           return Container();
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  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 ` [pve-devel] [PATCH pve_flutter_frontend 1/4] fix: run `dart fix` to fix the problems identified by diagnostic Shan Shaji
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 ` Shan Shaji [this message]
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-4-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