Skip to content

Commit 28aa92a

Browse files
committed
refactor(app): add comments on default state initialization
- Explain the purpose of initializing with default settings - Highlight the role of default settings in UI rendering and as a fallback - Mention the subsequent update with real user data
1 parent 807be03 commit 28aa92a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/app/bloc/app_bloc.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class AppBloc extends Bloc<AppEvent, AppState> {
3232
_environment = environment,
3333
super(
3434
AppState(
35+
// Initialize with default settings and preferences.
36+
// This is crucial for immediate UI rendering and provides a safe
37+
// fallback before user-specific settings are loaded.
38+
// The `AppSettingsRefreshed` event will later replace these
39+
// with actual user data.
3540
settings: UserAppSettings(
3641
id: 'default',
3742
displaySettings: const DisplaySettings(

0 commit comments

Comments
 (0)