@@ -30,9 +30,9 @@ class FeedInjectorService {
3030 required AppConfig appConfig,
3131 int currentFeedItemCount = 0 ,
3232 }) {
33- final List < FeedItem > finalFeed = [];
34- bool accountActionInjectedThisBatch = false ;
35- int headlinesInThisBatchCount = 0 ;
33+ final finalFeed = < FeedItem > [];
34+ var accountActionInjectedThisBatch = false ;
35+ var headlinesInThisBatchCount = 0 ;
3636 final adConfig = appConfig.adConfig;
3737 final userRole = user? .role ?? UserRole .guestUser;
3838
@@ -43,19 +43,15 @@ class FeedInjectorService {
4343 case UserRole .guestUser:
4444 adFrequency = adConfig.guestAdFrequency;
4545 adPlacementInterval = adConfig.guestAdPlacementInterval;
46- break ;
4746 case UserRole .standardUser: // Assuming 'authenticated' maps to standard
4847 adFrequency = adConfig.authenticatedAdFrequency;
4948 adPlacementInterval = adConfig.authenticatedAdPlacementInterval;
50- break ;
5149 case UserRole .premiumUser:
5250 adFrequency = adConfig.premiumAdFrequency;
5351 adPlacementInterval = adConfig.premiumAdPlacementInterval;
54- break ;
5552 default : // For any other roles, or if UserRole enum expands
5653 adFrequency = adConfig.guestAdFrequency; // Default to guest ads
5754 adPlacementInterval = adConfig.guestAdPlacementInterval;
58- break ;
5955 }
6056
6157 // Determine if an AccountAction is due before iterating
@@ -64,7 +60,7 @@ class FeedInjectorService {
6460 appConfig: appConfig,
6561 );
6662
67- for (int i = 0 ; i < headlines.length; i++ ) {
63+ for (var i = 0 ; i < headlines.length; i++ ) {
6864 final headline = headlines[i];
6965 finalFeed.add (headline);
7066 headlinesInThisBatchCount++ ;
@@ -139,27 +135,24 @@ class FeedInjectorService {
139135
140136 String title;
141137 String description;
142- String ctaText = 'Learn More' ;
138+ var ctaText = 'Learn More' ;
143139
144140 switch (variant) {
145141 case 0 :
146142 title = 'Unlock Your Full Potential!' ;
147143 description =
148144 'Link your account to enjoy expanded content access, keep your preferences synced, and experience a more streamlined ad display.' ;
149145 ctaText = 'Link Account & Explore' ;
150- break ;
151146 case 1 :
152147 title = 'Personalize Your Experience!' ;
153148 description =
154149 'Secure your settings and reading history across all your devices by linking your account. Enjoy a tailored news journey!' ;
155150 ctaText = 'Secure My Preferences' ;
156- break ;
157151 default : // case 2
158152 title = 'Get More From Your News!' ;
159153 description =
160154 'Link your account for enhanced content limits, better ad experiences, and ensure your preferences are always with you.' ;
161155 ctaText = 'Get Started' ;
162- break ;
163156 }
164157
165158 return AccountAction (
@@ -181,27 +174,24 @@ class FeedInjectorService {
181174
182175 String title;
183176 String description;
184- String ctaText = 'Explore Premium' ;
177+ var ctaText = 'Explore Premium' ;
185178
186179 switch (variant) {
187180 case 0 :
188181 title = 'Unlock Our Best Features!' ;
189182 description =
190183 'Go Premium to enjoy our most comprehensive content access, the best ad experience, and many more exclusive perks.' ;
191184 ctaText = 'Upgrade Now' ;
192- break ;
193185 case 1 :
194186 title = 'Elevate Your News Consumption!' ;
195187 description =
196188 'With Premium, your content limits are greatly expanded and you will enjoy our most favorable ad settings. Discover the difference!' ;
197189 ctaText = 'Discover Premium Benefits' ;
198- break ;
199190 default : // case 2
200191 title = 'Want More Control & Fewer Interruptions?' ;
201192 description =
202193 'Upgrade to Premium for a superior ad experience, massively increased content limits, and a more focused news journey.' ;
203194 ctaText = 'Yes, Upgrade Me!' ;
204- break ;
205195 }
206196 return AccountAction (
207197 title: title,
0 commit comments