@@ -41,8 +41,6 @@ class AppState extends Equatable {
4141 this .locale = const Locale ('en' ), // Default to English
4242 this .remoteConfig,
4343 this .environment,
44- this .pageTransitionCount = 0 , // New field for tracking page transitions
45- required this .showInterstitialAdStream, // New stream for interstitial ad signals
4644 });
4745
4846 /// The index of the currently selected item in the bottom navigation bar.
@@ -79,16 +77,6 @@ class AppState extends Equatable {
7977 /// The current application environment (e.g., production, development, demo).
8078 final local_config.AppEnvironment ? environment;
8179
82- /// Tracks the number of page transitions since the last interstitial ad was shown.
83- /// This count is used to determine when to display an interstitial ad.
84- final int pageTransitionCount;
85-
86- /// A stream that emits a signal when an interstitial ad should be shown.
87- ///
88- /// This stream is used by the [AdNavigatorObserver] to trigger the display
89- /// of interstitial ads based on the [AppBloc] 's logic.
90- final Stream <void > showInterstitialAdStream;
91-
9280 /// Creates a copy of the current state with updated values.
9381 AppState copyWith ({
9482 int ? selectedBottomNavigationIndex,
@@ -102,8 +90,6 @@ class AppState extends Equatable {
10290 Locale ? locale,
10391 RemoteConfig ? remoteConfig,
10492 local_config.AppEnvironment ? environment,
105- int ? pageTransitionCount, // New parameter for pageTransitionCount
106- Stream <void >? showInterstitialAdStream, // New parameter for the stream
10793 bool clearFontFamily = false ,
10894 bool clearAppConfig = false ,
10995 bool clearEnvironment = false ,
@@ -121,26 +107,21 @@ class AppState extends Equatable {
121107 locale: locale ?? this .locale,
122108 remoteConfig: clearAppConfig ? null : remoteConfig ?? this .remoteConfig,
123109 environment: clearEnvironment ? null : environment ?? this .environment,
124- pageTransitionCount: pageTransitionCount ?? this .pageTransitionCount,
125- showInterstitialAdStream:
126- showInterstitialAdStream ?? this .showInterstitialAdStream,
127110 );
128111 }
129112
130113 @override
131114 List <Object ?> get props => [
132- selectedBottomNavigationIndex,
133- themeMode,
134- flexScheme,
135- fontFamily,
136- appTextScaleFactor,
137- status,
138- user,
139- settings,
140- locale,
141- remoteConfig,
142- environment,
143- pageTransitionCount,
144- showInterstitialAdStream, // Include in props
145- ];
115+ selectedBottomNavigationIndex,
116+ themeMode,
117+ flexScheme,
118+ fontFamily,
119+ appTextScaleFactor,
120+ status,
121+ user,
122+ settings,
123+ locale,
124+ remoteConfig,
125+ environment,
126+ ];
146127}
0 commit comments