Skip to content

Commit 39e5cc8

Browse files
committed
lint: misc
1 parent b8ae1ed commit 39e5cc8

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

lib/app/config/app_environment.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ enum AppEnvironment {
1111
/// This environment is used during local development, typically connecting
1212
/// to a locally running Dart Frog backend API.
1313
development,
14-
14+
1515
/// Represents a demonstration environment with in-memory data.
1616
///
1717
/// This environment is designed for showcasing the application's user

lib/bootstrap.dart

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import 'package:flutter/foundation.dart' show kIsWeb;
22
import 'package:flutter/material.dart';
33
import 'package:flutter_bloc/flutter_bloc.dart';
4-
import 'package:flutter/foundation.dart' show kIsWeb;
5-
import 'package:flutter/material.dart';
6-
import 'package:flutter_bloc/flutter_bloc.dart';
74
import 'package:ht_auth_api/ht_auth_api.dart';
85
import 'package:ht_auth_client/ht_auth_client.dart';
96
import 'package:ht_auth_inmemory/ht_auth_inmemory.dart';
@@ -96,9 +93,7 @@ Future<void> bootstrap(app_config.AppConfig appConfig) async {
9693
appConfigClient = HtDataInMemoryClient<AppConfig>(
9794
toJson: (i) => i.toJson(),
9895
getId: (i) => i.id,
99-
initialData: [
100-
AppConfig.fromJson(appConfigFixtureData),
101-
],
96+
initialData: [AppConfig.fromJson(appConfigFixtureData)],
10297
);
10398
} else if (appConfig.environment == app_config.AppEnvironment.development) {
10499
headlinesClient = HtDataApi<Headline>(
@@ -108,37 +103,37 @@ Future<void> bootstrap(app_config.AppConfig appConfig) async {
108103
toJson: (headline) => headline.toJson(),
109104
);
110105
categoriesClient = HtDataApi<Category>(
111-
httpClient: httpClient!,
106+
httpClient: httpClient,
112107
modelName: 'category',
113108
fromJson: Category.fromJson,
114109
toJson: (category) => category.toJson(),
115110
);
116111
countriesClient = HtDataApi<Country>(
117-
httpClient: httpClient!,
112+
httpClient: httpClient,
118113
modelName: 'country',
119114
fromJson: Country.fromJson,
120115
toJson: (country) => country.toJson(),
121116
);
122117
sourcesClient = HtDataApi<Source>(
123-
httpClient: httpClient!,
118+
httpClient: httpClient,
124119
modelName: 'source',
125120
fromJson: Source.fromJson,
126121
toJson: (source) => source.toJson(),
127122
);
128123
userContentPreferencesClient = HtDataApi<UserContentPreferences>(
129-
httpClient: httpClient!,
124+
httpClient: httpClient,
130125
modelName: 'user_content_preferences',
131126
fromJson: UserContentPreferences.fromJson,
132127
toJson: (prefs) => prefs.toJson(),
133128
);
134129
userAppSettingsClient = HtDataApi<UserAppSettings>(
135-
httpClient: httpClient!,
130+
httpClient: httpClient,
136131
modelName: 'user_app_settings',
137132
fromJson: UserAppSettings.fromJson,
138133
toJson: (settings) => settings.toJson(),
139134
);
140135
appConfigClient = HtDataApi<AppConfig>(
141-
httpClient: httpClient!,
136+
httpClient: httpClient,
142137
modelName: 'app_config',
143138
fromJson: AppConfig.fromJson,
144139
toJson: (config) => config.toJson(),
@@ -152,37 +147,37 @@ Future<void> bootstrap(app_config.AppConfig appConfig) async {
152147
toJson: (headline) => headline.toJson(),
153148
);
154149
categoriesClient = HtDataApi<Category>(
155-
httpClient: httpClient!,
150+
httpClient: httpClient,
156151
modelName: 'category',
157152
fromJson: Category.fromJson,
158153
toJson: (category) => category.toJson(),
159154
);
160155
countriesClient = HtDataApi<Country>(
161-
httpClient: httpClient!,
156+
httpClient: httpClient,
162157
modelName: 'country',
163158
fromJson: Country.fromJson,
164159
toJson: (country) => country.toJson(),
165160
);
166161
sourcesClient = HtDataApi<Source>(
167-
httpClient: httpClient!,
162+
httpClient: httpClient,
168163
modelName: 'source',
169164
fromJson: Source.fromJson,
170165
toJson: (source) => source.toJson(),
171166
);
172167
userContentPreferencesClient = HtDataApi<UserContentPreferences>(
173-
httpClient: httpClient!,
168+
httpClient: httpClient,
174169
modelName: 'user_content_preferences',
175170
fromJson: UserContentPreferences.fromJson,
176171
toJson: (prefs) => prefs.toJson(),
177172
);
178173
userAppSettingsClient = HtDataApi<UserAppSettings>(
179-
httpClient: httpClient!,
174+
httpClient: httpClient,
180175
modelName: 'user_app_settings',
181176
fromJson: UserAppSettings.fromJson,
182177
toJson: (settings) => settings.toJson(),
183178
);
184179
appConfigClient = HtDataApi<AppConfig>(
185-
httpClient: httpClient!,
180+
httpClient: httpClient,
186181
modelName: 'app_config',
187182
fromJson: AppConfig.fromJson,
188183
toJson: (config) => config.toJson(),

lib/headlines-search/bloc/headlines_search_bloc.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class HeadlinesSearchBloc
184184
rawResponse = await _headlinesRepository.readAllByQuery({
185185
'q': searchTerm,
186186
'model': modelType.toJson(),
187-
}, limit: _limit);
187+
}, limit: _limit,);
188188
final headlines = rawResponse.items.cast<Headline>();
189189
final currentUser = _appBloc.state.user;
190190
final appConfig = _appBloc.state.appConfig;
@@ -208,13 +208,13 @@ class HeadlinesSearchBloc
208208
rawResponse = await _categoryRepository.readAllByQuery({
209209
'q': searchTerm,
210210
'model': modelType.toJson(),
211-
}, limit: _limit);
211+
}, limit: _limit,);
212212
processedItems = rawResponse.items.cast<FeedItem>();
213213
case SearchModelType.source:
214214
rawResponse = await _sourceRepository.readAllByQuery({
215215
'q': searchTerm,
216216
'model': modelType.toJson(),
217-
}, limit: _limit);
217+
}, limit: _limit,);
218218
processedItems = rawResponse.items.cast<FeedItem>();
219219
}
220220
emit(

0 commit comments

Comments
 (0)