hot reload init fix

This commit is contained in:
julian 2022-08-26 10:38:33 -06:00
parent 2ada2d5bde
commit 7fa827cbc6

View file

@ -176,7 +176,14 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
late final Completer<void> loadingCompleter;
bool didLoad = false;
Future<void> load() async {
if (didLoad) {
return;
}
didLoad = true;
await DB.instance.init();
_notificationsService = ref.read(notificationsProvider);