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
+10 -16
View File
@@ -296,10 +296,7 @@ class ListPage extends StatelessWidget {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
ListTile( RadioGroup<int>(
title: const Text(Strings.author),
leading: Radio<int>(
value: 0,
groupValue: provider.filterBy, groupValue: provider.filterBy,
onChanged: (value) { onChanged: (value) {
if (value != null) { if (value != null) {
@@ -307,25 +304,19 @@ class ListPage extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
} }
}, },
), child: Column(
children: [
ListTile(
title: const Text(Strings.author),
leading: Radio<int>(value: 0),
onTap: () { onTap: () {
provider.setFilterBy(0); provider.setFilterBy(0);
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
ListTile( ListTile(
title: const Text(Strings.quote), title: const Text(Strings.quote),
leading: Radio<int>( leading: Radio<int>(value: 1),
value: 1,
groupValue: provider.filterBy,
onChanged: (value) {
if (value != null) {
provider.setFilterBy(value);
Navigator.pop(context);
}
},
),
onTap: () { onTap: () {
provider.setFilterBy(1); provider.setFilterBy(1);
Navigator.pop(context); Navigator.pop(context);
@@ -333,6 +324,9 @@ class ListPage extends StatelessWidget {
), ),
], ],
), ),
),
],
)
); );
}, },
); );