1
0
mirror of https://github.com/stonega/tsacdop synced 2025-02-09 08:08:46 +01:00

Change RadioListTile radius

This commit is contained in:
stonegate 2020-07-12 20:53:34 +08:00
parent 6a88054ffe
commit 1710e5da77

View File

@ -82,30 +82,51 @@ class ThemeSetting extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
RadioListTile( ClipRRect(
title: Text(s.systemDefault), borderRadius:
value: ThemeMode.system, BorderRadius.all(Radius.circular(5)),
groupValue: settings.theme, child: Material(
onChanged: (value) { color: Colors.transparent,
settings.setTheme = value; child: RadioListTile(
Navigator.of(context).pop(); title: Text(s.systemDefault),
}), value: ThemeMode.system,
RadioListTile( groupValue: settings.theme,
title: Text(s.darkMode), onChanged: (value) {
value: ThemeMode.dark, settings.setTheme = value;
groupValue: settings.theme, Navigator.of(context).pop();
onChanged: (value) { }),
settings.setTheme = value; ),
Navigator.of(context).pop(); ),
}), ClipRRect(
RadioListTile( borderRadius:
title: Text(s.lightMode), BorderRadius.all(Radius.circular(5)),
value: ThemeMode.light, child: Material(
groupValue: settings.theme, color: Colors.transparent,
onChanged: (value) { child: RadioListTile(
settings.setTheme = value; title: Text(s.darkMode),
Navigator.of(context).pop(); value: ThemeMode.dark,
}), groupValue: settings.theme,
onChanged: (value) {
settings.setTheme = value;
Navigator.of(context).pop();
}),
),
),
ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(5)),
child: Material(
color: Colors.transparent,
child: RadioListTile(
title: Text(s.lightMode),
value: ThemeMode.light,
groupValue: settings.theme,
onChanged: (value) {
settings.setTheme = value;
Navigator.of(context).pop();
}),
),
),
], ],
), ),
), ),