@@ -7,6 +7,7 @@ abstract class AppEvent extends Equatable {
7
7
List <Object ?> get props => [];
8
8
}
9
9
10
+ /// Dispatched when the authentication state changes (e.g., user logs in/out).
10
11
class AppUserChanged extends AppEvent {
11
12
const AppUserChanged (this .user);
12
13
@@ -16,122 +17,81 @@ class AppUserChanged extends AppEvent {
16
17
List <Object ?> get props => [user];
17
18
}
18
19
19
- /// {@template app_settings_refreshed}
20
- /// Internal event to trigger reloading of settings within AppBloc.
21
- /// Added when user changes or upon explicit request.
22
- /// {@endtemplate}
20
+ /// Dispatched to request a refresh of the user's application settings.
23
21
class AppSettingsRefreshed extends AppEvent {
24
- /// {@macro app_settings_refreshed}
25
22
const AppSettingsRefreshed ();
26
23
}
27
24
28
- /// {@template app_logout_requested}
29
- /// Event to request user logout.
30
- /// {@endtemplate}
25
+ /// Dispatched to fetch the remote application configuration.
26
+ class AppConfigFetchRequested extends AppEvent {
27
+ const AppConfigFetchRequested ({this .isBackgroundCheck = false });
28
+
29
+ /// Whether this fetch is a silent background check.
30
+ ///
31
+ /// If `true` , the BLoC will not enter a visible loading state.
32
+ /// If `false` (default), it's treated as an initial fetch that shows a
33
+ /// loading UI.
34
+ final bool isBackgroundCheck;
35
+
36
+ @override
37
+ List <Object > get props => [isBackgroundCheck];
38
+ }
39
+
40
+ /// Dispatched when the user logs out.
31
41
class AppLogoutRequested extends AppEvent {
32
- /// {@macro app_logout_requested}
33
42
const AppLogoutRequested ();
34
43
}
35
44
36
- /// {@template app_theme_mode_changed}
37
- /// Event to change the application's theme mode.
38
- /// {@endtemplate}
45
+ /// Dispatched when the theme mode (light/dark/system) changes.
39
46
class AppThemeModeChanged extends AppEvent {
40
- /// {@macro app_theme_mode_changed}
41
47
const AppThemeModeChanged (this .themeMode);
42
-
43
48
final ThemeMode themeMode;
44
-
45
49
@override
46
- List <Object ? > get props => [themeMode];
50
+ List <Object > get props => [themeMode];
47
51
}
48
52
49
- /// {@template app_flex_scheme_changed}
50
- /// Event to change the application's FlexColorScheme.
51
- /// {@endtemplate}
53
+ /// Dispatched when the accent color theme changes.
52
54
class AppFlexSchemeChanged extends AppEvent {
53
- /// {@macro app_flex_scheme_changed}
54
55
const AppFlexSchemeChanged (this .flexScheme);
55
-
56
56
final FlexScheme flexScheme;
57
-
58
57
@override
59
- List <Object ? > get props => [flexScheme];
58
+ List <Object > get props => [flexScheme];
60
59
}
61
60
62
- /// {@template app_font_family_changed}
63
- /// Event to change the application's font family.
64
- /// {@endtemplate}
61
+ /// Dispatched when the font family changes.
65
62
class AppFontFamilyChanged extends AppEvent {
66
- /// {@macro app_font_family_changed}
67
63
const AppFontFamilyChanged (this .fontFamily);
68
-
69
64
final String ? fontFamily;
70
-
71
65
@override
72
66
List <Object ?> get props => [fontFamily];
73
67
}
74
68
75
- /// {@template app_text_scale_factor_changed}
76
- /// Event to change the application's text scale factor.
77
- /// {@endtemplate}
69
+ /// Dispatched when the text scale factor changes.
78
70
class AppTextScaleFactorChanged extends AppEvent {
79
- /// {@macro app_text_scale_factor_changed}
80
71
const AppTextScaleFactorChanged (this .appTextScaleFactor);
81
-
82
72
final AppTextScaleFactor appTextScaleFactor;
83
-
84
73
@override
85
- List <Object ? > get props => [appTextScaleFactor];
74
+ List <Object > get props => [appTextScaleFactor];
86
75
}
87
76
88
- /// {@template app_font_weight_changed}
89
- /// Event to change the application's font weight.
90
- /// {@endtemplate}
77
+ /// Dispatched when the font weight changes.
91
78
class AppFontWeightChanged extends AppEvent {
92
- /// {@macro app_font_weight_changed}
93
79
const AppFontWeightChanged (this .fontWeight);
94
-
95
- /// The new font weight to apply.
96
80
final AppFontWeight fontWeight;
97
-
98
81
@override
99
82
List <Object > get props => [fontWeight];
100
83
}
101
84
102
- /// {@template app_config_fetch_requested}
103
- /// Event to trigger fetching of the global AppConfig.
104
- /// {@endtemplate}
105
- class AppConfigFetchRequested extends AppEvent {
106
- /// {@macro app_config_fetch_requested}
107
- const AppConfigFetchRequested ();
108
- }
109
-
110
- /// {@template app_opened}
111
- /// Event triggered when the application is opened.
112
- /// Used to check for required updates or maintenance mode.
113
- /// {@endtemplate}
114
- class AppOpened extends AppEvent {
115
- /// {@macro app_opened}
116
- const AppOpened ();
117
- }
118
-
119
- /// {@template app_user_account_action_shown}
120
- /// Event triggered when an AccountAction has been shown to the user,
121
- /// prompting an update to their `lastAccountActionShownAt` timestamp.
122
- /// {@endtemplate}
85
+ /// Dispatched when a one-time user account action has been shown.
123
86
class AppUserAccountActionShown extends AppEvent {
124
- /// {@macro app_user_account_action_shown}
125
87
const AppUserAccountActionShown ({
126
88
required this .userId,
127
89
required this .feedActionType,
128
90
required this .isCompleted,
129
91
});
130
-
131
92
final String userId;
132
93
final FeedActionType feedActionType;
133
94
final bool isCompleted;
134
-
135
95
@override
136
96
List <Object > get props => [userId, feedActionType, isCompleted];
137
97
}
0 commit comments