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

@@ -164,7 +164,7 @@ void main() {
baseUrl: 'https://example.invalid/pos',
client: MockClient(
(_) 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,
reason: 'the imported account must work');
reason: 'the imported account must work',);
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('6274'), isNull);
});
@@ -62,16 +62,16 @@ void main() {
test('a leaver loses the till on the next sign-in', () async {
await staff.replaceFromBackOffice(const [
StaffImportRecord(
localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391'),
localId: 'boffice-1', name: 'Asha', role: StaffRole.cashier, pin: '7391',),
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);
// Ravi is removed in the back office.
await staff.replaceFromBackOffice(const [
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);
@@ -83,11 +83,11 @@ void main() {
// gets one account with a new PIN, not two accounts with one each.
await staff.replaceFromBackOffice(const [
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 [
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();
@@ -103,7 +103,7 @@ void main() {
// flag is for the seeds, which everyone shares.
await staff.replaceFromBackOffice(const [
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');
@@ -115,11 +115,11 @@ void main() {
// `pin = 0` is the single most common value in app_users.
await staff.replaceFromBackOffice(const [
StaffImportRecord(
localId: 'boffice-1', name: 'No PIN', role: StaffRole.cashier, pin: '0'),
localId: 'boffice-1', name: 'No PIN', role: StaffRole.cashier, pin: '0',),
StaffImportRecord(
localId: 'boffice-2', name: 'Blank', role: StaffRole.cashier, pin: ''),
localId: 'boffice-2', name: 'Blank', role: StaffRole.cashier, pin: '',),
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();
@@ -133,11 +133,11 @@ void main() {
// would deactivate the seeds and leave nobody able to sign in.
final written = await staff.replaceFromBackOffice(const [
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(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',);
});
}