@@ -7,6 +7,7 @@ abstract class AppEvent extends Equatable {
77 List <Object ?> get props => [];
88}
99
10+ /// Dispatched when the authentication state changes (e.g., user logs in/out).
1011class AppUserChanged extends AppEvent {
1112 const AppUserChanged (this .user);
1213
@@ -16,122 +17,81 @@ class AppUserChanged extends AppEvent {
1617 List <Object ?> get props => [user];
1718}
1819
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.
2321class AppSettingsRefreshed extends AppEvent {
24- /// {@macro app_settings_refreshed}
2522 const AppSettingsRefreshed ();
2623}
2724
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.
3141class AppLogoutRequested extends AppEvent {
32- /// {@macro app_logout_requested}
3342 const AppLogoutRequested ();
3443}
3544
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.
3946class AppThemeModeChanged extends AppEvent {
40- /// {@macro app_theme_mode_changed}
4147 const AppThemeModeChanged (this .themeMode);
42-
4348 final ThemeMode themeMode;
44-
4549 @override
46- List <Object ? > get props => [themeMode];
50+ List <Object > get props => [themeMode];
4751}
4852
49- /// {@template app_flex_scheme_changed}
50- /// Event to change the application's FlexColorScheme.
51- /// {@endtemplate}
53+ /// Dispatched when the accent color theme changes.
5254class AppFlexSchemeChanged extends AppEvent {
53- /// {@macro app_flex_scheme_changed}
5455 const AppFlexSchemeChanged (this .flexScheme);
55-
5656 final FlexScheme flexScheme;
57-
5857 @override
59- List <Object ? > get props => [flexScheme];
58+ List <Object > get props => [flexScheme];
6059}
6160
62- /// {@template app_font_family_changed}
63- /// Event to change the application's font family.
64- /// {@endtemplate}
61+ /// Dispatched when the font family changes.
6562class AppFontFamilyChanged extends AppEvent {
66- /// {@macro app_font_family_changed}
6763 const AppFontFamilyChanged (this .fontFamily);
68-
6964 final String ? fontFamily;
70-
7165 @override
7266 List <Object ?> get props => [fontFamily];
7367}
7468
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.
7870class AppTextScaleFactorChanged extends AppEvent {
79- /// {@macro app_text_scale_factor_changed}
8071 const AppTextScaleFactorChanged (this .appTextScaleFactor);
81-
8272 final AppTextScaleFactor appTextScaleFactor;
83-
8473 @override
85- List <Object ? > get props => [appTextScaleFactor];
74+ List <Object > get props => [appTextScaleFactor];
8675}
8776
88- /// {@template app_font_weight_changed}
89- /// Event to change the application's font weight.
90- /// {@endtemplate}
77+ /// Dispatched when the font weight changes.
9178class AppFontWeightChanged extends AppEvent {
92- /// {@macro app_font_weight_changed}
9379 const AppFontWeightChanged (this .fontWeight);
94-
95- /// The new font weight to apply.
9680 final AppFontWeight fontWeight;
97-
9881 @override
9982 List <Object > get props => [fontWeight];
10083}
10184
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.
12386class AppUserAccountActionShown extends AppEvent {
124- /// {@macro app_user_account_action_shown}
12587 const AppUserAccountActionShown ({
12688 required this .userId,
12789 required this .feedActionType,
12890 required this .isCompleted,
12991 });
130-
13192 final String userId;
13293 final FeedActionType feedActionType;
13394 final bool isCompleted;
134-
13595 @override
13696 List <Object > get props => [userId, feedActionType, isCompleted];
13797}
0 commit comments