@@ -30,9 +30,9 @@ class AppStatusService with WidgetsBindingObserver {
30
30
required BuildContext context,
31
31
required Duration checkInterval,
32
32
required AppEnvironment environment,
33
- }) : _context = context,
34
- _checkInterval = checkInterval,
35
- _environment = environment {
33
+ }) : _context = context,
34
+ _checkInterval = checkInterval,
35
+ _environment = environment {
36
36
// Immediately register this service as a lifecycle observer.
37
37
WidgetsBinding .instance.addObserver (this );
38
38
// Start the periodic checks.
@@ -62,18 +62,16 @@ class AppStatusService with WidgetsBindingObserver {
62
62
_timer = Timer .periodic (_checkInterval, (_) {
63
63
// In demo mode, periodic checks are not needed as there's no backend.
64
64
if (_environment == AppEnvironment .demo) {
65
- print (
66
- '[AppStatusService] Demo mode: Skipping periodic check.' ,
67
- );
65
+ print ('[AppStatusService] Demo mode: Skipping periodic check.' );
68
66
return ;
69
67
}
70
68
print (
71
69
'[AppStatusService] Periodic check triggered. Requesting AppConfig fetch.' ,
72
70
);
73
71
// Add the event to the AppBloc to fetch the latest config.
74
- _context
75
- . read < AppBloc >()
76
- . add ( const AppConfigFetchRequested (isBackgroundCheck : true ) );
72
+ _context. read < AppBloc >(). add (
73
+ const AppConfigFetchRequested (isBackgroundCheck : true ),
74
+ );
77
75
});
78
76
}
79
77
@@ -92,9 +90,7 @@ class AppStatusService with WidgetsBindingObserver {
92
90
93
91
// We are only interested in the 'resumed' state.
94
92
if (state == AppLifecycleState .resumed) {
95
- print (
96
- '[AppStatusService] App resumed. Requesting AppConfig fetch.' ,
97
- );
93
+ print ('[AppStatusService] App resumed. Requesting AppConfig fetch.' );
98
94
// When the app comes to the foreground, immediately trigger a check.
99
95
// This is crucial for catching maintenance mode that was enabled
100
96
// while the app was in the background.
0 commit comments