From 8c4a7afa56fef60bc2d6a3b177a0a663c05e923c Mon Sep 17 00:00:00 2001 From: odweta Date: Fri, 3 Apr 2026 12:13:23 +0200 Subject: [PATCH] fix filter radio buttons (remove deprecated code) --- frontend/lib/pages/list.dart | 60 ++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/frontend/lib/pages/list.dart b/frontend/lib/pages/list.dart index fa7487a..21e221b 100644 --- a/frontend/lib/pages/list.dart +++ b/frontend/lib/pages/list.dart @@ -296,43 +296,37 @@ class ListPage extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - ListTile( - title: const Text(Strings.author), - leading: Radio( - value: 0, - groupValue: provider.filterBy, - onChanged: (value) { - if (value != null) { - provider.setFilterBy(value); - Navigator.pop(context); - } - }, - ), - onTap: () { - provider.setFilterBy(0); - Navigator.pop(context); + RadioGroup( + groupValue: provider.filterBy, + onChanged: (value) { + if (value != null) { + provider.setFilterBy(value); + Navigator.pop(context); + } }, - ), - - ListTile( - title: const Text(Strings.quote), - leading: Radio( - value: 1, - groupValue: provider.filterBy, - onChanged: (value) { - if (value != null) { - provider.setFilterBy(value); - Navigator.pop(context); - } - }, + child: Column( + children: [ + ListTile( + title: const Text(Strings.author), + leading: Radio(value: 0), + onTap: () { + provider.setFilterBy(0); + Navigator.pop(context); + }, + ), + ListTile( + title: const Text(Strings.quote), + leading: Radio(value: 1), + onTap: () { + provider.setFilterBy(1); + Navigator.pop(context); + }, + ), + ], ), - onTap: () { - provider.setFilterBy(1); - Navigator.pop(context); - }, ), ], - ), + ) ); }, );