fix: Update type adapter for ThemeMode

This commit is contained in:
Anton Stubenbord
2023-06-02 00:00:07 +02:00
parent 99196b0226
commit 0c69f47618

View File

@@ -12,9 +12,9 @@ class ThemeModeAdapter extends TypeAdapter<ThemeMode> {
case 0: case 0:
return ThemeMode.system; return ThemeMode.system;
case 1: case 1:
return ThemeMode.dark;
case 2:
return ThemeMode.light; return ThemeMode.light;
case 2:
return ThemeMode.dark;
default: default:
return ThemeMode.system; return ThemeMode.system;
} }
@@ -41,7 +41,5 @@ class ThemeModeAdapter extends TypeAdapter<ThemeMode> {
@override @override
bool operator ==(Object other) => bool operator ==(Object other) =>
identical(this, other) || identical(this, other) ||
other is ThemeModeAdapter && other is ThemeModeAdapter && runtimeType == other.runtimeType && typeId == other.typeId;
runtimeType == other.runtimeType &&
typeId == other.typeId;
} }