mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-04-17 16:10:34 +00:00
Merge pull request #8 from inventree/master
Update flutter version (#805)
This commit is contained in:
commit
457594685e
7 changed files with 65 additions and 78 deletions
|
|
@ -755,6 +755,9 @@
|
|||
"level": "Level",
|
||||
"@level": {},
|
||||
|
||||
"lightMode": "Light Mode",
|
||||
"@lightMode": {},
|
||||
|
||||
"lineItemAdd": "Add Line Item",
|
||||
"@lineItemAdd": {},
|
||||
|
||||
|
|
@ -1628,6 +1631,9 @@
|
|||
"switchCamera": "Switch Camera",
|
||||
"@switchCamera": {},
|
||||
|
||||
"system": "System",
|
||||
"@system": {},
|
||||
|
||||
"takePicture": "Take Picture",
|
||||
"@takePicture": {},
|
||||
|
||||
|
|
|
|||
|
|
@ -35,50 +35,33 @@ class ThemeSelectionDialog extends StatelessWidget {
|
|||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
RadioListTile<AdaptiveThemeMode>(
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(TablerIcons.device_desktop),
|
||||
SizedBox(width: 10),
|
||||
Text("System"),
|
||||
],
|
||||
),
|
||||
value: AdaptiveThemeMode.system,
|
||||
RadioGroup<AdaptiveThemeMode>(
|
||||
groupValue: currentThemeMode,
|
||||
onChanged: (value) {
|
||||
AdaptiveTheme.of(context).setThemeMode(AdaptiveThemeMode.system);
|
||||
onThemeSelected();
|
||||
if (value != null) {
|
||||
AdaptiveTheme.of(context).setThemeMode(value);
|
||||
onThemeSelected();
|
||||
}
|
||||
},
|
||||
),
|
||||
RadioListTile<AdaptiveThemeMode>(
|
||||
title: Row(
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(TablerIcons.sun),
|
||||
SizedBox(width: 10),
|
||||
Text("Light"),
|
||||
RadioListTile<AdaptiveThemeMode>(
|
||||
value: AdaptiveThemeMode.system,
|
||||
title: Text(L10().system),
|
||||
secondary: Icon(TablerIcons.device_desktop),
|
||||
),
|
||||
RadioListTile<AdaptiveThemeMode>(
|
||||
value: AdaptiveThemeMode.light,
|
||||
title: Text(L10().lightMode),
|
||||
secondary: Icon(TablerIcons.sun),
|
||||
),
|
||||
RadioListTile<AdaptiveThemeMode>(
|
||||
value: AdaptiveThemeMode.dark,
|
||||
title: Text(L10().darkMode),
|
||||
secondary: Icon(TablerIcons.moon),
|
||||
),
|
||||
],
|
||||
),
|
||||
value: AdaptiveThemeMode.light,
|
||||
groupValue: currentThemeMode,
|
||||
onChanged: (value) {
|
||||
AdaptiveTheme.of(context).setThemeMode(AdaptiveThemeMode.light);
|
||||
onThemeSelected();
|
||||
},
|
||||
),
|
||||
RadioListTile<AdaptiveThemeMode>(
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(TablerIcons.moon),
|
||||
SizedBox(width: 10),
|
||||
Text("Dark"),
|
||||
],
|
||||
),
|
||||
value: AdaptiveThemeMode.dark,
|
||||
groupValue: currentThemeMode,
|
||||
onChanged: (value) {
|
||||
AdaptiveTheme.of(context).setThemeMode(AdaptiveThemeMode.dark);
|
||||
onThemeSelected();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class Spinner extends StatefulWidget {
|
|||
const Spinner({
|
||||
this.color = COLOR_GRAY_LIGHT,
|
||||
Key? key,
|
||||
@required this.icon,
|
||||
required this.icon,
|
||||
this.duration = const Duration(milliseconds: 1800),
|
||||
}) : super(key: key);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue