Skip to content

Commit

Permalink
Merge pull request #327 from aeecleclair/add-trailing-comma
Browse files Browse the repository at this point in the history
Add trailing comma
  • Loading branch information
julien4215 authored Mar 18, 2024
2 parents 90cdc7d + 7e56e7e commit 99fc0b9
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 9 deletions.
3 changes: 2 additions & 1 deletion lib/admin/ui/pages/add_loaner_page/add_loaner_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class AddLoanerPage extends HookConsumerWidget {
child: Column(
children: [
const AlignLeftText(
AdminTextConstants.addLoaningAssociation),
AdminTextConstants.addLoaningAssociation,
),
const SizedBox(height: 30),
AsyncChild(
value: associations,
Expand Down
4 changes: 3 additions & 1 deletion lib/admin/ui/pages/edit_page/search_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ class SearchUser extends HookConsumerWidget {
.toList(),
);
final value = await groupNotifier.deleteMember(
newGroup, x);
newGroup,
x,
);
if (value) {
simpleGroupGroupsNotifier.setTData(
newGroup.id,
Expand Down
5 changes: 4 additions & 1 deletion lib/advert/ui/components/advert_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion lib/loan/providers/item_list_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class ItemListNotifier extends ListNotifier<Item> {
return state.whenData(
(items) => items
.where(
(item) => item.name.toLowerCase().contains(query.toLowerCase()))
(item) => item.name.toLowerCase().contains(query.toLowerCase()),
)
.toList(),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class AssociationMemberListNotifier extends ListNotifier<CompleteMember> {
) async {
return await loadList(
() async => associationMemberRepository.getAssociationMemberList(
associationId, year),
associationId,
year,
),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: () {
Expand Down
4 changes: 3 additions & 1 deletion lib/tools/providers/list_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ abstract class ListNotifier<T> extends StateNotifier<AsyncValue<List<T>>> {
},
loading: () {
state = const AsyncValue.error(
"Cannot add while loading", StackTrace.empty);
"Cannot add while loading",
StackTrace.empty,
);
return false;
},
);
Expand Down
4 changes: 3 additions & 1 deletion lib/tools/providers/single_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ abstract class SingleNotifier<T> extends StateNotifier<AsyncValue<T>> {
},
loading: () {
state = const AsyncValue.error(
"Cannot add while loading", StackTrace.empty);
"Cannot add while loading",
StackTrace.empty,
);
return false;
},
);
Expand Down
4 changes: 3 additions & 1 deletion test/loan/loan_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 99fc0b9

Please sign in to comment.