Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trailing comma #327

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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