Skip to content

Commit 950d70d

Browse files
authored
chore: fix require_trailing_commas (#3977)
1 parent dc1958c commit 950d70d

File tree

29 files changed

+136
-138
lines changed

29 files changed

+136
-138
lines changed

analysis_options.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,13 @@ linter:
8181
- implicit_call_tearoffs
8282
- implicit_reopen
8383
- invalid_case_patterns
84-
- iterable_contains_unrelated_type
8584
- join_return_with_assignment
8685
- leading_newlines_in_multiline_strings
8786
- library_annotations
8887
- library_names
8988
- library_prefixes
9089
- library_private_types_in_public_api
9190
- lines_longer_than_80_chars
92-
- list_remove_unrelated_type
9391
- literal_only_boolean_expressions
9492
- missing_whitespace_between_adjacent_strings
9593
- no_adjacent_strings_in_list

examples/flutter_dynamic_form/test/new_car/bloc/new_car_bloc_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void main() {
149149
models: mockModels,
150150
model: mockModel,
151151
years: mockYears,
152-
).copyWith(year: mockYear)
152+
).copyWith(year: mockYear),
153153
],
154154
verify: (_) => verifyInOrder([
155155
newCarRepository.fetchBrands,

examples/flutter_firebase_login/lib/home/view/home_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class HomePage extends StatelessWidget {
2222
onPressed: () {
2323
context.read<AppBloc>().add(const AppLogoutRequested());
2424
},
25-
)
25+
),
2626
],
2727
),
2828
body: Align(

examples/flutter_firebase_login/test/app/routes/routes_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void main() {
1414
(p) => p.child,
1515
'child',
1616
isA<HomePage>(),
17-
)
17+
),
1818
],
1919
);
2020
});
@@ -27,7 +27,7 @@ void main() {
2727
(p) => p.child,
2828
'child',
2929
isA<LoginPage>(),
30-
)
30+
),
3131
],
3232
);
3333
});

examples/flutter_firebase_login/test/login/cubit/login_cubit_test.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void main() {
138138
email: validEmail,
139139
password: validPassword,
140140
isValid: true,
141-
)
141+
),
142142
],
143143
);
144144

@@ -174,7 +174,7 @@ void main() {
174174
email: validEmail,
175175
password: validPassword,
176176
isValid: true,
177-
)
177+
),
178178
],
179179
);
180180

@@ -208,7 +208,7 @@ void main() {
208208
email: validEmail,
209209
password: validPassword,
210210
isValid: true,
211-
)
211+
),
212212
],
213213
);
214214
});
@@ -230,7 +230,7 @@ void main() {
230230
act: (cubit) => cubit.logInWithGoogle(),
231231
expect: () => const <LoginState>[
232232
LoginState(status: FormzSubmissionStatus.inProgress),
233-
LoginState(status: FormzSubmissionStatus.success)
233+
LoginState(status: FormzSubmissionStatus.success),
234234
],
235235
);
236236

@@ -249,7 +249,7 @@ void main() {
249249
LoginState(
250250
status: FormzSubmissionStatus.failure,
251251
errorMessage: 'oops',
252-
)
252+
),
253253
],
254254
);
255255

@@ -265,7 +265,7 @@ void main() {
265265
act: (cubit) => cubit.logInWithGoogle(),
266266
expect: () => const <LoginState>[
267267
LoginState(status: FormzSubmissionStatus.inProgress),
268-
LoginState(status: FormzSubmissionStatus.failure)
268+
LoginState(status: FormzSubmissionStatus.failure),
269269
],
270270
);
271271
});

examples/flutter_firebase_login/test/sign_up/cubit/sign_up_cubit_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ void main() {
245245
password: validPassword,
246246
confirmedPassword: validConfirmedPassword,
247247
isValid: true,
248-
)
248+
),
249249
],
250250
);
251251

@@ -283,7 +283,7 @@ void main() {
283283
password: validPassword,
284284
confirmedPassword: validConfirmedPassword,
285285
isValid: true,
286-
)
286+
),
287287
],
288288
);
289289

@@ -320,7 +320,7 @@ void main() {
320320
password: validPassword,
321321
confirmedPassword: validConfirmedPassword,
322322
isValid: true,
323-
)
323+
),
324324
],
325325
);
326326
});

examples/flutter_infinite_list/test/posts/bloc/post_bloc_test.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void main() {
1919
group('PostBloc', () {
2020
const mockPosts = [Post(id: 1, title: 'post title', body: 'post body')];
2121
const extraMockPosts = [
22-
Post(id: 2, title: 'post title', body: 'post body')
22+
Post(id: 2, title: 'post title', body: 'post body'),
2323
];
2424

2525
late http.Client httpClient;
@@ -58,7 +58,7 @@ void main() {
5858
build: () => PostBloc(httpClient: httpClient),
5959
act: (bloc) => bloc.add(PostFetched()),
6060
expect: () => const <PostState>[
61-
PostState(status: PostStatus.success, posts: mockPosts)
61+
PostState(status: PostStatus.success, posts: mockPosts),
6262
],
6363
verify: (_) {
6464
verify(() => httpClient.get(_postsUrl(start: 0))).called(1);
@@ -80,7 +80,7 @@ void main() {
8080
..add(PostFetched())
8181
..add(PostFetched()),
8282
expect: () => const <PostState>[
83-
PostState(status: PostStatus.success, posts: mockPosts)
83+
PostState(status: PostStatus.success, posts: mockPosts),
8484
],
8585
verify: (_) {
8686
verify(() => httpClient.get(any())).called(1);
@@ -104,7 +104,7 @@ void main() {
104104
bloc.add(PostFetched());
105105
},
106106
expect: () => const <PostState>[
107-
PostState(status: PostStatus.success, posts: mockPosts)
107+
PostState(status: PostStatus.success, posts: mockPosts),
108108
],
109109
verify: (_) {
110110
verify(() => httpClient.get(any())).called(1);
@@ -145,7 +145,7 @@ void main() {
145145
status: PostStatus.success,
146146
posts: mockPosts,
147147
hasReachedMax: true,
148-
)
148+
),
149149
],
150150
verify: (_) {
151151
verify(() => httpClient.get(_postsUrl(start: 1))).called(1);
@@ -173,7 +173,7 @@ void main() {
173173
PostState(
174174
status: PostStatus.success,
175175
posts: [...mockPosts, ...extraMockPosts],
176-
)
176+
),
177177
],
178178
verify: (_) {
179179
verify(() => httpClient.get(_postsUrl(start: 1))).called(1);

examples/flutter_shopping_cart/lib/app.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class App extends StatelessWidget {
2222
create: (_) => CartBloc(
2323
shoppingRepository: shoppingRepository,
2424
)..add(CartStarted()),
25-
)
25+
),
2626
],
2727
child: MaterialApp(
2828
title: 'Flutter Bloc Shopping Cart',

examples/flutter_shopping_cart/lib/cart/view/cart_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CartPage extends StatelessWidget {
2020
),
2121
),
2222
Divider(height: 4, color: Colors.black),
23-
CartTotal()
23+
CartTotal(),
2424
],
2525
),
2626
),

examples/flutter_shopping_cart/test/cart/bloc/cart_bloc_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void main() {
7676
seed: () => CartLoaded(cart: Cart(items: mockItems)),
7777
act: (bloc) => bloc.add(CartItemAdded(mockItemToAdd)),
7878
expect: () => <CartState>[
79-
CartLoaded(cart: Cart(items: [...mockItems, mockItemToAdd]))
79+
CartLoaded(cart: Cart(items: [...mockItems, mockItemToAdd])),
8080
],
8181
verify: (_) {
8282
verify(() => shoppingRepository.addItemToCart(mockItemToAdd)).called(1);
@@ -112,7 +112,7 @@ void main() {
112112
seed: () => CartLoaded(cart: Cart(items: mockItems)),
113113
act: (bloc) => bloc.add(CartItemRemoved(mockItemToRemove)),
114114
expect: () => <CartState>[
115-
CartLoaded(cart: Cart(items: [...mockItems]..remove(mockItemToRemove)))
115+
CartLoaded(cart: Cart(items: [...mockItems]..remove(mockItemToRemove))),
116116
],
117117
verify: (_) {
118118
verify(

examples/flutter_timer/lib/timer/view/timer_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Actions extends StatelessWidget {
108108
context.read<TimerBloc>().add(const TimerReset()),
109109
),
110110
]
111-
}
111+
},
112112
],
113113
);
114114
},

examples/flutter_todos/packages/local_storage_todos_api/lib/src/local_storage_todos_api.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class LocalStorageTodosApi extends TodosApi {
9292
final changedTodosAmount =
9393
todos.where((t) => t.isCompleted != isCompleted).length;
9494
final newTodos = [
95-
for (final todo in todos) todo.copyWith(isCompleted: isCompleted)
95+
for (final todo in todos) todo.copyWith(isCompleted: isCompleted),
9696
];
9797
_todoStreamController.add(newTodos);
9898
await _setValue(kTodosCollectionKey, json.encode(newTodos));

0 commit comments

Comments
 (0)