diff --git a/lib/src/pages/edit_currency_page.dart b/lib/src/pages/edit_currency_page.dart index 057a220..e47d184 100644 --- a/lib/src/pages/edit_currency_page.dart +++ b/lib/src/pages/edit_currency_page.dart @@ -49,12 +49,14 @@ class _EditCurrencyPageState extends State { final name = curr.name.replaceAll('_', ''); final title = '${name.toUpperCase()} ($symbol)'; - return RadioListTile.adaptive( - controlAffinity: ListTileControlAffinity.trailing, - value: curr, - groupValue: _curr, - title: Text(title), - onChanged: (v) => _onChanged(v!), + return RadioGroup( + groupValue: curr, + onChanged: (Currency? value) => _onChanged(value!), + child: RadioListTile.adaptive( + controlAffinity: ListTileControlAffinity.trailing, + value: curr, + title: Text(title), + ), ); }, separatorBuilder: (_, _) => Divider(height: 0.0), diff --git a/lib/src/pages/set_language_page.dart b/lib/src/pages/set_language_page.dart index 0f05b97..26036ec 100644 --- a/lib/src/pages/set_language_page.dart +++ b/lib/src/pages/set_language_page.dart @@ -35,12 +35,14 @@ class _SetLanguagePageState extends ConsumerState { var opt = LangOption.values[index]; var locale = _getLocale(opt); - return RadioListTile.adaptive( - controlAffinity: ListTileControlAffinity.trailing, - title: Text(_getName(opt)), - value: opt, + return RadioGroup( groupValue: _opt, - onChanged: (v) => _onChanged(v, locale), + onChanged: (LangOption? value) => _onChanged(value, locale), + child: RadioListTile.adaptive( + controlAffinity: ListTileControlAffinity.trailing, + title: Text(_getName(opt)), + value: opt, + ), ); }, separatorBuilder: (_, _) => const Divider(height: 0.0),