File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import 'package:flutter_news_app_mobile_client_full_source_code/app/config/confi
1818 as app_config;
1919import 'package:flutter_news_app_mobile_client_full_source_code/app/services/demo_data_migration_service.dart' ;
2020import 'package:flutter_news_app_mobile_client_full_source_code/bloc_observer.dart' ;
21+ import 'package:flutter_news_app_mobile_client_full_source_code/shared/data/clients/country_inmemory_client.dart' ;
2122import 'package:http_client/http_client.dart' ;
2223import 'package:kv_storage_shared_preferences/kv_storage_shared_preferences.dart' ;
2324import 'package:logging/logging.dart' ;
@@ -106,6 +107,13 @@ Future<Widget> bootstrap(
106107 initialData: countriesFixturesData,
107108 logger: logger,
108109 );
110+ // Wrap the generic DataInMemory<Country> with CountryInMemoryClient
111+ // to add specialized filtering like 'hasActiveSources' and 'hasActiveHeadlines'.
112+ countriesClient = CountryInMemoryClient (
113+ decoratedClient: countriesClient,
114+ allSources: sourcesFixturesData,
115+ allHeadlines: headlinesFixturesData,
116+ );
109117 sourcesClient = DataInMemory <Source >(
110118 toJson: (i) => i.toJson (),
111119 getId: (i) => i.id,
You can’t perform that action at this time.
0 commit comments