Fix startup crash
This commit is contained in:
parent
fba4017819
commit
f2563a0397
@ -177,7 +177,7 @@ void main() async {
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
AppTheme theme = AppTheme.values[prefs.getInt('app-theme') ?? AppTheme.defaultTheme];
|
||||
AppTheme theme = AppTheme.values[prefs.getInt('app-theme') ?? AppTheme.defaultTheme.index];
|
||||
|
||||
runZoned(() {
|
||||
runApp(new HAClientApp(
|
||||
|
Reference in New Issue
Block a user