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
1 changed files with 6 additions and 4 deletions

View File

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