@@ -159,11 +159,12 @@ class CountryService {
159159 // Atomically retrieve or create the future for the specific cache key.
160160 var future = _eventCountriesFutures[cacheKey];
161161 if (future == null ) {
162- future = _fetchAndCacheEventCountries (nameFilter: nameFilter)
163- .whenComplete (() => _eventCountriesFutures.remove (cacheKey));
162+ future = _fetchAndCacheEventCountries (
163+ nameFilter: nameFilter,
164+ ).whenComplete (() => _eventCountriesFutures.remove (cacheKey));
164165 _eventCountriesFutures[cacheKey] = future;
165166 }
166- return future! ;
167+ return future;
167168 }
168169
169170 /// Fetches a distinct list of countries that are referenced as
@@ -185,11 +186,12 @@ class CountryService {
185186 // Atomically retrieve or create the future for the specific cache key.
186187 var future = _headquarterCountriesFutures[cacheKey];
187188 if (future == null ) {
188- future = _fetchAndCacheHeadquarterCountries (nameFilter: nameFilter)
189- .whenComplete (() => _headquarterCountriesFutures.remove (cacheKey));
189+ future = _fetchAndCacheHeadquarterCountries (
190+ nameFilter: nameFilter,
191+ ).whenComplete (() => _headquarterCountriesFutures.remove (cacheKey));
190192 _headquarterCountriesFutures[cacheKey] = future;
191193 }
192- return future! ;
194+ return future;
193195 }
194196
195197 /// Helper method to fetch and cache distinct event countries.
@@ -295,9 +297,7 @@ class CountryService {
295297 }
296298
297299 final pipeline = < Map <String , Object >> [
298- < String , Object > {
299- r'$match' : matchStage,
300- },
300+ < String , Object > {r'$match' : matchStage},
301301 < String , Object > {
302302 r'$group' : < String , Object > {
303303 '_id' : '\$ $fieldName .id' ,
0 commit comments