provider lifecycle hardenings

This commit is contained in:
Fabian Freund
2026-05-06 18:32:45 +02:00
parent d5f977a3d2
commit fee15cb8d2
25 changed files with 246 additions and 94 deletions
@@ -60,7 +60,7 @@ class AppInitializationService extends _$AppInitializationService {
}
Future<void> initialize() async {
state = await Result.fromAsync(() async {
final result = await Result.fromAsync(() async {
final errors = <ErrorMessage>[];
await ref.read(formatProvider.future);
@@ -80,6 +80,12 @@ class AppInitializationService extends _$AppInitializationService {
return (initialized: true, stage: null, errors: errors);
});
if (!ref.mounted) {
return;
}
state = result;
}
@override