Skip to content

Commit a12b9af

Browse files
committed
feat(app): add AppVersionCheckRequested event
- Add new event to request application version check against remote config - Include remoteConfig and isBackgroundCheck parameters - Update props to include new parameters
1 parent cdff67f commit a12b9af

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lib/app/bloc/app_event.dart

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,28 @@ class AppPeriodicConfigFetchRequested extends AppEvent {
8989
List<Object> get props => [isBackgroundCheck];
9090
}
9191

92+
/// Dispatched to request a check of the application's version against
93+
/// the remote configuration.
94+
///
95+
/// This event is used to determine if a mandatory update is required.
96+
class AppVersionCheckRequested extends AppEvent {
97+
const AppVersionCheckRequested({
98+
required this.remoteConfig,
99+
this.isBackgroundCheck = true,
100+
});
101+
102+
/// The latest remote configuration.
103+
final RemoteConfig remoteConfig;
104+
105+
/// Whether this check is a silent background check.
106+
///
107+
/// If `true`, the BLoC will not enter a visible loading state.
108+
final bool isBackgroundCheck;
109+
110+
@override
111+
List<Object> get props => [remoteConfig, isBackgroundCheck];
112+
}
113+
92114
/// Dispatched when the user logs out.
93115
///
94116
/// This event triggers the sign-out process, clearing authentication tokens

0 commit comments

Comments
 (0)