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(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
title: const Text(Strings.author),
leading: Radio<int>(
value: 0,
groupValue: provider.filterBy,
onChanged: (value) {
if (value != null) {
provider.setFilterBy(value);
Navigator.pop(context);
}
},
),
onTap: () {
provider.setFilterBy(0);
Navigator.pop(context);
RadioGroup<int>(
groupValue: provider.filterBy,
onChanged: (value) {
if (value != null) {
provider.setFilterBy(value);
Navigator.pop(context);
}
},
),
ListTile(
title: const Text(Strings.quote),
leading: Radio<int>(
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<int>(value: 0),
onTap: () {
provider.setFilterBy(0);
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);
},
),
],
),
)
);
},
);