Skip to content

Commit 497ed22

Browse files
committed
refactor: Use HtDataInMemory instead of client
- Simpler naming - Remove unnecessary abstraction
1 parent 9282bcf commit 497ed22

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/bootstrap.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,35 +62,35 @@ Future<void> bootstrap(app_config.AppConfig appConfig) async {
6262
HtDataClient<AppConfig> appConfigClient;
6363

6464
if (appConfig.environment == app_config.AppEnvironment.demo) {
65-
headlinesClient = HtDataInMemoryClient<Headline>(
65+
headlinesClient = HtDataInMemory<Headline>(
6666
toJson: (i) => i.toJson(),
6767
getId: (i) => i.id,
6868
initialData: headlinesFixturesData.map(Headline.fromJson).toList(),
6969
);
70-
categoriesClient = HtDataInMemoryClient<Category>(
70+
categoriesClient = HtDataInMemory<Category>(
7171
toJson: (i) => i.toJson(),
7272
getId: (i) => i.id,
7373
initialData: categoriesFixturesData.map(Category.fromJson).toList(),
7474
);
75-
countriesClient = HtDataInMemoryClient<Country>(
75+
countriesClient = HtDataInMemory<Country>(
7676
toJson: (i) => i.toJson(),
7777
getId: (i) => i.id,
7878
initialData: countriesFixturesData.map(Country.fromJson).toList(),
7979
);
80-
sourcesClient = HtDataInMemoryClient<Source>(
80+
sourcesClient = HtDataInMemory<Source>(
8181
toJson: (i) => i.toJson(),
8282
getId: (i) => i.id,
8383
initialData: sourcesFixturesData.map(Source.fromJson).toList(),
8484
);
85-
userContentPreferencesClient = HtDataInMemoryClient<UserContentPreferences>(
85+
userContentPreferencesClient = HtDataInMemory<UserContentPreferences>(
8686
toJson: (i) => i.toJson(),
8787
getId: (i) => i.id,
8888
);
89-
userAppSettingsClient = HtDataInMemoryClient<UserAppSettings>(
89+
userAppSettingsClient = HtDataInMemory<UserAppSettings>(
9090
toJson: (i) => i.toJson(),
9191
getId: (i) => i.id,
9292
);
93-
appConfigClient = HtDataInMemoryClient<AppConfig>(
93+
appConfigClient = HtDataInMemory<AppConfig>(
9494
toJson: (i) => i.toJson(),
9595
getId: (i) => i.id,
9696
initialData: [AppConfig.fromJson(appConfigFixtureData)],

0 commit comments

Comments
 (0)