Apply the trailing-comma lint the analyzer asks for

Formatting only, from dart fix. No behaviour change — the release APK and the
full suite both pass either way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Suriya
2026-08-06 17:10:48 +05:30
parent 4f9a5c3d6b
commit 7b6cd598f0
4 changed files with 36 additions and 36 deletions

View File

@@ -20,8 +20,8 @@
# If you do want real analysis of this directory, do it on Linux with the GTK # If you do want real analysis of this directory, do it on Linux with the GTK
# headers present and a compile_commands.json — not by editing the runner. # headers present and a compile_commands.json — not by editing the runner.
If: If:
PathMatch: linux/.* PathMatch: [.*linux/.*, linux/.*]
Diagnostics: Diagnostics:
Suppress: '*' Suppress: ["*"]
UnusedIncludes: None UnusedIncludes: None

View File

@@ -164,7 +164,7 @@ void main() {
baseUrl: 'https://example.invalid/pos', baseUrl: 'https://example.invalid/pos',
client: MockClient( client: MockClient(
(_) async => http.Response(jsonEncode(body), status, (_) async => http.Response(jsonEncode(body), status,
headers: {'content-type': 'application/json'}), headers: {'content-type': 'application/json'},),
), ),
); );

View File

@@ -43,9 +43,9 @@ void main() {
]); ]);
expect(await staff.authenticate('7391'), isNotNull, expect(await staff.authenticate('7391'), isNotNull,
reason: 'the imported account must work'); reason: 'the imported account must work',);
expect(await staff.authenticate('4821'), isNull, expect(await staff.authenticate('4821'), isNull,
reason: 'Suriya was compiled into the app and must be gone'); reason: 'Suriya was compiled into the app and must be gone',);
expect(await staff.authenticate('5093'), isNull); expect(await staff.authenticate('5093'), isNull);
expect(await staff.authenticate('6274'), isNull); expect(await staff.authenticate('6274'), isNull);
}); });
@@ -62,16 +62,16 @@ void main() {
test('a leaver loses the till on the next sign-in', () async { test('a leaver loses the till on the next sign-in', () async {
await staff.replaceFromBackOffice(const [ await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391'), localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391',),
StaffImportRecord( StaffImportRecord(
localId: 'boffice-2', name: 'Ravi', role: StaffRole.cashier, pin: '8402'), localId: 'boffice-2', name: 'Ravi', role: StaffRole.cashier, pin: '8402',),
]); ]);
expect(await staff.authenticate('8402'), isNotNull); expect(await staff.authenticate('8402'), isNotNull);
// Ravi is removed in the back office. // Ravi is removed in the back office.
await staff.replaceFromBackOffice(const [ await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391'), localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391',),
]); ]);
expect(await staff.authenticate('7391'), isNotNull); expect(await staff.authenticate('7391'), isNotNull);
@@ -83,11 +83,11 @@ void main() {
// gets one account with a new PIN, not two accounts with one each. // gets one account with a new PIN, not two accounts with one each.
await staff.replaceFromBackOffice(const [ await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391'), localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391',),
]); ]);
await staff.replaceFromBackOffice(const [ await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'Asha Kumar', role: StaffRole.manager, pin: '8402'), localId: 'boffice-1', name: 'Asha Kumar', role: StaffRole.manager, pin: '8402',),
]); ]);
final all = await staff.all(); final all = await staff.all();
@@ -103,7 +103,7 @@ void main() {
// flag is for the seeds, which everyone shares. // flag is for the seeds, which everyone shares.
await staff.replaceFromBackOffice(const [ await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391'), localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391',),
]); ]);
final imported = await staff.authenticate('7391'); final imported = await staff.authenticate('7391');
@@ -115,11 +115,11 @@ void main() {
// `pin = 0` is the single most common value in app_users. // `pin = 0` is the single most common value in app_users.
await staff.replaceFromBackOffice(const [ await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'No PIN', role: StaffRole.cashier, pin: '0'), localId: 'boffice-1', name: 'No PIN', role: StaffRole.cashier, pin: '0',),
StaffImportRecord( StaffImportRecord(
localId: 'boffice-2', name: 'Blank', role: StaffRole.cashier, pin: ''), localId: 'boffice-2', name: 'Blank', role: StaffRole.cashier, pin: '',),
StaffImportRecord( StaffImportRecord(
localId: 'boffice-3', name: 'Usable', role: StaffRole.cashier, pin: '7391'), localId: 'boffice-3', name: 'Usable', role: StaffRole.cashier, pin: '7391',),
]); ]);
final all = await staff.all(); final all = await staff.all();
@@ -133,11 +133,11 @@ void main() {
// would deactivate the seeds and leave nobody able to sign in. // would deactivate the seeds and leave nobody able to sign in.
final written = await staff.replaceFromBackOffice(const [ final written = await staff.replaceFromBackOffice(const [
StaffImportRecord( StaffImportRecord(
localId: 'boffice-1', name: 'No PIN', role: StaffRole.cashier, pin: '0'), localId: 'boffice-1', name: 'No PIN', role: StaffRole.cashier, pin: '0',),
]); ]);
expect(written, 0); expect(written, 0);
expect(await staff.authenticate('4821'), isNotNull, expect(await staff.authenticate('4821'), isNotNull,
reason: 'the seeds must survive an import that wrote nobody'); reason: 'the seeds must survive an import that wrote nobody',);
}); });
} }