fix filter radio buttons (remove deprecated code)

This commit is contained in:
odweta
2026-04-03 12:13:23 +02:00
parent 5477db71d9
commit 8c4a7afa56
+27 -33
View File
@@ -296,43 +296,37 @@ class ListPage extends StatelessWidget {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
ListTile( RadioGroup<int>(
title: const Text(Strings.author), groupValue: provider.filterBy,
leading: Radio<int>( onChanged: (value) {
value: 0, if (value != null) {
groupValue: provider.filterBy, provider.setFilterBy(value);
onChanged: (value) { Navigator.pop(context);
if (value != null) { }
provider.setFilterBy(value);
Navigator.pop(context);
}
},
),
onTap: () {
provider.setFilterBy(0);
Navigator.pop(context);
}, },
), child: Column(
children: [
ListTile( ListTile(
title: const Text(Strings.quote), title: const Text(Strings.author),
leading: Radio<int>( leading: Radio<int>(value: 0),
value: 1, onTap: () {
groupValue: provider.filterBy, provider.setFilterBy(0);
onChanged: (value) { Navigator.pop(context);
if (value != null) { },
provider.setFilterBy(value); ),
Navigator.pop(context); ListTile(
} title: const Text(Strings.quote),
}, leading: Radio<int>(value: 1),
onTap: () {
provider.setFilterBy(1);
Navigator.pop(context);
},
),
],
), ),
onTap: () {
provider.setFilterBy(1);
Navigator.pop(context);
},
), ),
], ],
), )
); );
}, },
); );