From 43ce42139aee2b6385614f47d2460bc9fb4853e8 Mon Sep 17 00:00:00 2001 From: Julien <120588494+julien4215@users.noreply.github.com> Date: Sat, 16 Mar 2024 22:52:56 +0100 Subject: [PATCH 1/2] add trailing comma --- lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart | 2 +- lib/admin/ui/pages/edit_page/search_user.dart | 2 +- lib/advert/ui/components/advert_card.dart | 2 +- lib/loan/providers/item_list_provider.dart | 2 +- lib/phonebook/providers/association_member_list_provider.dart | 2 +- .../pages/association_editor_page/association_editor_page.dart | 2 +- lib/tools/providers/list_notifier.dart | 2 +- lib/tools/providers/single_notifier.dart | 2 +- test/loan/loan_test.dart | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart b/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart index 5a9ff05b7..f3d72e971 100644 --- a/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart +++ b/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart @@ -39,7 +39,7 @@ class AddLoanerPage extends HookConsumerWidget { child: Column( children: [ const AlignLeftText( - AdminTextConstants.addLoaningAssociation), + AdminTextConstants.addLoaningAssociation,), const SizedBox(height: 30), AsyncChild( value: associations, diff --git a/lib/admin/ui/pages/edit_page/search_user.dart b/lib/admin/ui/pages/edit_page/search_user.dart index cecca47b0..1f507bfc3 100644 --- a/lib/admin/ui/pages/edit_page/search_user.dart +++ b/lib/admin/ui/pages/edit_page/search_user.dart @@ -123,7 +123,7 @@ class SearchUser extends HookConsumerWidget { .toList(), ); final value = await groupNotifier.deleteMember( - newGroup, x); + newGroup, x,); if (value) { simpleGroupGroupsNotifier.setTData( newGroup.id, diff --git a/lib/advert/ui/components/advert_card.dart b/lib/advert/ui/components/advert_card.dart index 36e857ec3..83456a2f2 100644 --- a/lib/advert/ui/components/advert_card.dart +++ b/lib/advert/ui/components/advert_card.dart @@ -177,7 +177,7 @@ class AdvertCard extends HookConsumerWidget { ), Container( padding: const EdgeInsets.only( - top: 20, left: 10, right: 10), + top: 20, left: 10, right: 10,), width: width, height: height - imageHeight, child: Column( diff --git a/lib/loan/providers/item_list_provider.dart b/lib/loan/providers/item_list_provider.dart index 018ad7eec..02b286498 100644 --- a/lib/loan/providers/item_list_provider.dart +++ b/lib/loan/providers/item_list_provider.dart @@ -43,7 +43,7 @@ class ItemListNotifier extends ListNotifier { return state.whenData( (items) => items .where( - (item) => item.name.toLowerCase().contains(query.toLowerCase())) + (item) => item.name.toLowerCase().contains(query.toLowerCase()),) .toList(), ); } diff --git a/lib/phonebook/providers/association_member_list_provider.dart b/lib/phonebook/providers/association_member_list_provider.dart index 536923f0c..dc6533c95 100644 --- a/lib/phonebook/providers/association_member_list_provider.dart +++ b/lib/phonebook/providers/association_member_list_provider.dart @@ -21,7 +21,7 @@ class AssociationMemberListNotifier extends ListNotifier { ) async { return await loadList( () async => associationMemberRepository.getAssociationMemberList( - associationId, year), + associationId, year,), ); } diff --git a/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart b/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart index 7ba2d1eb2..6fed0f706 100644 --- a/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart +++ b/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart @@ -324,7 +324,7 @@ class AssociationEditorPage extends HookConsumerWidget { builder: (context) => AlertDialog( title: const Text(PhonebookTextConstants.newMandate), content: const Text( - PhonebookTextConstants.changeMandateConfirm), + PhonebookTextConstants.changeMandateConfirm,), actions: [ TextButton( onPressed: () { diff --git a/lib/tools/providers/list_notifier.dart b/lib/tools/providers/list_notifier.dart index ab6cbf6d5..0ed1d90a9 100644 --- a/lib/tools/providers/list_notifier.dart +++ b/lib/tools/providers/list_notifier.dart @@ -46,7 +46,7 @@ abstract class ListNotifier extends StateNotifier>> { }, loading: () { state = const AsyncValue.error( - "Cannot add while loading", StackTrace.empty); + "Cannot add while loading", StackTrace.empty,); return false; }, ); diff --git a/lib/tools/providers/single_notifier.dart b/lib/tools/providers/single_notifier.dart index 8b1a9c580..c02d721a3 100644 --- a/lib/tools/providers/single_notifier.dart +++ b/lib/tools/providers/single_notifier.dart @@ -45,7 +45,7 @@ abstract class SingleNotifier extends StateNotifier> { }, loading: () { state = const AsyncValue.error( - "Cannot add while loading", StackTrace.empty); + "Cannot add while loading", StackTrace.empty,); return false; }, ); diff --git a/test/loan/loan_test.dart b/test/loan/loan_test.dart index 0f101a410..5ead149bb 100644 --- a/test/loan/loan_test.dart +++ b/test/loan/loan_test.dart @@ -149,7 +149,7 @@ void main() { newLoan = loan.copyWith( itemsQuantity: [ ItemQuantity( - itemSimple: ItemSimple(id: '2', name: 'name'), quantity: 2), + itemSimple: ItemSimple(id: '2', name: 'name'), quantity: 2,), ], ); expect(newLoan.itemsQuantity[0].itemSimple.id, '2'); From 7e56e7ed7be2956815d169121b5c4fabf22a3917 Mon Sep 17 00:00:00 2001 From: Julien <120588494+julien4215@users.noreply.github.com> Date: Sat, 16 Mar 2024 22:57:47 +0100 Subject: [PATCH 2/2] format files --- lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart | 3 ++- lib/admin/ui/pages/edit_page/search_user.dart | 4 +++- lib/advert/ui/components/advert_card.dart | 5 ++++- lib/loan/providers/item_list_provider.dart | 3 ++- .../providers/association_member_list_provider.dart | 4 +++- .../association_editor_page/association_editor_page.dart | 3 ++- lib/tools/providers/list_notifier.dart | 4 +++- lib/tools/providers/single_notifier.dart | 4 +++- test/loan/loan_test.dart | 4 +++- 9 files changed, 25 insertions(+), 9 deletions(-) diff --git a/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart b/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart index f3d72e971..39b5699bb 100644 --- a/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart +++ b/lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart @@ -39,7 +39,8 @@ class AddLoanerPage extends HookConsumerWidget { child: Column( children: [ const AlignLeftText( - AdminTextConstants.addLoaningAssociation,), + AdminTextConstants.addLoaningAssociation, + ), const SizedBox(height: 30), AsyncChild( value: associations, diff --git a/lib/admin/ui/pages/edit_page/search_user.dart b/lib/admin/ui/pages/edit_page/search_user.dart index 1f507bfc3..d9034f0f9 100644 --- a/lib/admin/ui/pages/edit_page/search_user.dart +++ b/lib/admin/ui/pages/edit_page/search_user.dart @@ -123,7 +123,9 @@ class SearchUser extends HookConsumerWidget { .toList(), ); final value = await groupNotifier.deleteMember( - newGroup, x,); + newGroup, + x, + ); if (value) { simpleGroupGroupsNotifier.setTData( newGroup.id, diff --git a/lib/advert/ui/components/advert_card.dart b/lib/advert/ui/components/advert_card.dart index 83456a2f2..da5d11497 100644 --- a/lib/advert/ui/components/advert_card.dart +++ b/lib/advert/ui/components/advert_card.dart @@ -177,7 +177,10 @@ class AdvertCard extends HookConsumerWidget { ), Container( padding: const EdgeInsets.only( - top: 20, left: 10, right: 10,), + top: 20, + left: 10, + right: 10, + ), width: width, height: height - imageHeight, child: Column( diff --git a/lib/loan/providers/item_list_provider.dart b/lib/loan/providers/item_list_provider.dart index 02b286498..08677eb4a 100644 --- a/lib/loan/providers/item_list_provider.dart +++ b/lib/loan/providers/item_list_provider.dart @@ -43,7 +43,8 @@ class ItemListNotifier extends ListNotifier { return state.whenData( (items) => items .where( - (item) => item.name.toLowerCase().contains(query.toLowerCase()),) + (item) => item.name.toLowerCase().contains(query.toLowerCase()), + ) .toList(), ); } diff --git a/lib/phonebook/providers/association_member_list_provider.dart b/lib/phonebook/providers/association_member_list_provider.dart index dc6533c95..02396b145 100644 --- a/lib/phonebook/providers/association_member_list_provider.dart +++ b/lib/phonebook/providers/association_member_list_provider.dart @@ -21,7 +21,9 @@ class AssociationMemberListNotifier extends ListNotifier { ) async { return await loadList( () async => associationMemberRepository.getAssociationMemberList( - associationId, year,), + associationId, + year, + ), ); } diff --git a/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart b/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart index 6fed0f706..8d518eb4a 100644 --- a/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart +++ b/lib/phonebook/ui/pages/association_editor_page/association_editor_page.dart @@ -324,7 +324,8 @@ class AssociationEditorPage extends HookConsumerWidget { builder: (context) => AlertDialog( title: const Text(PhonebookTextConstants.newMandate), content: const Text( - PhonebookTextConstants.changeMandateConfirm,), + PhonebookTextConstants.changeMandateConfirm, + ), actions: [ TextButton( onPressed: () { diff --git a/lib/tools/providers/list_notifier.dart b/lib/tools/providers/list_notifier.dart index 0ed1d90a9..6b564895d 100644 --- a/lib/tools/providers/list_notifier.dart +++ b/lib/tools/providers/list_notifier.dart @@ -46,7 +46,9 @@ abstract class ListNotifier extends StateNotifier>> { }, loading: () { state = const AsyncValue.error( - "Cannot add while loading", StackTrace.empty,); + "Cannot add while loading", + StackTrace.empty, + ); return false; }, ); diff --git a/lib/tools/providers/single_notifier.dart b/lib/tools/providers/single_notifier.dart index c02d721a3..1a05e6e50 100644 --- a/lib/tools/providers/single_notifier.dart +++ b/lib/tools/providers/single_notifier.dart @@ -45,7 +45,9 @@ abstract class SingleNotifier extends StateNotifier> { }, loading: () { state = const AsyncValue.error( - "Cannot add while loading", StackTrace.empty,); + "Cannot add while loading", + StackTrace.empty, + ); return false; }, ); diff --git a/test/loan/loan_test.dart b/test/loan/loan_test.dart index 5ead149bb..04ba1fa42 100644 --- a/test/loan/loan_test.dart +++ b/test/loan/loan_test.dart @@ -149,7 +149,9 @@ void main() { newLoan = loan.copyWith( itemsQuantity: [ ItemQuantity( - itemSimple: ItemSimple(id: '2', name: 'name'), quantity: 2,), + itemSimple: ItemSimple(id: '2', name: 'name'), + quantity: 2, + ), ], ); expect(newLoan.itemsQuantity[0].itemSimple.id, '2');