From 5e0fdf5f81d0d36ba1712346ebc7f5cf56075ac0 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Sat, 14 Oct 2023 15:43:35 -0500 Subject: [PATCH] chore: fix `require_trailing_commas` (#3977) --- lib/app.dart | 2 +- lib/cart/view/cart_page.dart | 2 +- test/cart/bloc/cart_bloc_test.dart | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index 8bfe3c6d98d..eb629d4ada7 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -22,7 +22,7 @@ class App extends StatelessWidget { create: (_) => CartBloc( shoppingRepository: shoppingRepository, )..add(CartStarted()), - ) + ), ], child: MaterialApp( title: 'Flutter Bloc Shopping Cart', diff --git a/lib/cart/view/cart_page.dart b/lib/cart/view/cart_page.dart index e69a09194f7..035a1981c53 100644 --- a/lib/cart/view/cart_page.dart +++ b/lib/cart/view/cart_page.dart @@ -20,7 +20,7 @@ class CartPage extends StatelessWidget { ), ), Divider(height: 4, color: Colors.black), - CartTotal() + CartTotal(), ], ), ), diff --git a/test/cart/bloc/cart_bloc_test.dart b/test/cart/bloc/cart_bloc_test.dart index 5e194d12105..6698c0e489d 100644 --- a/test/cart/bloc/cart_bloc_test.dart +++ b/test/cart/bloc/cart_bloc_test.dart @@ -76,7 +76,7 @@ void main() { seed: () => CartLoaded(cart: Cart(items: mockItems)), act: (bloc) => bloc.add(CartItemAdded(mockItemToAdd)), expect: () => [ - CartLoaded(cart: Cart(items: [...mockItems, mockItemToAdd])) + CartLoaded(cart: Cart(items: [...mockItems, mockItemToAdd])), ], verify: (_) { verify(() => shoppingRepository.addItemToCart(mockItemToAdd)).called(1); @@ -112,7 +112,7 @@ void main() { seed: () => CartLoaded(cart: Cart(items: mockItems)), act: (bloc) => bloc.add(CartItemRemoved(mockItemToRemove)), expect: () => [ - CartLoaded(cart: Cart(items: [...mockItems]..remove(mockItemToRemove))) + CartLoaded(cart: Cart(items: [...mockItems]..remove(mockItemToRemove))), ], verify: (_) { verify(