POST broke ;-;

This commit is contained in:
2023-12-31 13:49:46 +02:00
parent 49508758b5
commit 6a2df6938e
2 changed files with 32 additions and 20 deletions

View File

@@ -12,7 +12,8 @@ class MyApp extends StatefulWidget {
@override
State<MyApp> createState() => _MyAppState();
static _MyAppState of(BuildContext context) => context.findAncestorStateOfType<_MyAppState>()!;
static _MyAppState of(BuildContext context) =>
context.findAncestorStateOfType<_MyAppState>()!;
}
class _MyAppState extends State<MyApp> {
@@ -67,10 +68,13 @@ class _MyAppState extends State<MyApp> {
switch(newTheme) {
case "Light":
_theme = ThemeMode.light;
break;
case "Dark":
_theme = ThemeMode.dark;
break;
case "System Default":
_theme = ThemeMode.system;
break;
}
});
}