File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
3
3
import 'package:riverpod_annotation/riverpod_annotation.dart' ;
4
4
import 'package:starter_architecture_flutter_firebase/src/constants/app_sizes.dart' ;
5
5
import 'package:starter_architecture_flutter_firebase/src/features/onboarding/data/onboarding_repository.dart' ;
6
+ import 'package:starter_architecture_flutter_firebase/src/utils/shared_preferences_provider.dart' ;
6
7
7
8
part 'app_startup.g.dart' ;
8
9
@@ -11,12 +12,14 @@ part 'app_startup.g.dart';
11
12
Future <void > appStartup (Ref ref) async {
12
13
ref.onDispose (() {
13
14
// ensure dependent providers are disposed as well
15
+ ref.invalidate (sharedPreferencesProvider);
14
16
ref.invalidate (onboardingRepositoryProvider);
15
17
});
16
18
// Uncomment this to test that URL-based navigation and deep linking works
17
19
// even when there's a delay in the app startup logic
18
20
// await Future.delayed(Duration(seconds: 1));
19
21
// await for all initialization code to be complete before returning
22
+ await ref.watch (sharedPreferencesProvider.future);
20
23
await ref.watch (onboardingRepositoryProvider.future);
21
24
}
22
25
You can’t perform that action at this time.
0 commit comments