fix: Set theme after start app

This commit is contained in:
Christian Pauly 2022-11-13 12:37:25 +01:00
parent 5cce7257b4
commit c088563573

View File

@ -491,10 +491,12 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
store.getItem(SettingKeys.chatColor).then((value) { store.getItem(SettingKeys.chatColor).then((value) {
if (value != null && int.tryParse(value) != null) { if (value != null && int.tryParse(value) != null) {
AppConfig.colorSchemeSeed = Color(int.parse(value)); AppConfig.colorSchemeSeed = Color(int.parse(value));
AdaptiveTheme.of(context).setTheme( WidgetsBinding.instance.addPostFrameCallback((_) {
light: FluffyThemes.buildTheme(Brightness.light), AdaptiveTheme.of(context).setTheme(
dark: FluffyThemes.buildTheme(Brightness.dark), light: FluffyThemes.buildTheme(Brightness.light),
); dark: FluffyThemes.buildTheme(Brightness.dark),
);
});
} }
}); });
} }