mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-11-10 20:27:04 +01:00
billsplit: fix the two CI gates that were already red on main
flutter analyze --fatal-infos exited 1 at 6713ef3 with four
unnecessary_unawaited issues in lib/ui/home_screen.dart: Flutter now
annotates Navigator.push with @awaitNotRequired, which makes the
unawaited() wrappers redundant. Removed all four wrappers and the
dart:async import they were the only user of.
dart format --set-exit-if-changed was separately red on three test files
left unformatted by 917b8fb. One trailing blank line each.
Both are steps in .github/workflows/billsplit-ci.yml, so billsplit CI was
failing on main for reasons unrelated to any current work. Fixing them
first means the platform-directory deletion that follows can be verified
green-to-green.
flutter test: 60 passing before and after - the unchanged count is what
proves the unawaited() removals did not shift navigation timing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
This commit is contained in:
parent
917b8fbf0b
commit
dfe17a6b8b
@ -1,4 +1,3 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:billsplit/domain/eparagon_parser.dart';
|
||||
@ -26,11 +25,9 @@ class HomeScreen extends StatelessWidget {
|
||||
IconButton(
|
||||
tooltip: 'People & groups',
|
||||
icon: const Icon(Icons.group),
|
||||
onPressed: () => unawaited(
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(builder: (_) => const PeopleScreen()),
|
||||
),
|
||||
onPressed: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(builder: (_) => const PeopleScreen()),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -70,12 +67,10 @@ class HomeScreen extends StatelessWidget {
|
||||
formatPln(r.itemsTotalGr),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
onTap: () => unawaited(
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => ReceiptScreen(receiptId: r.id),
|
||||
),
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => ReceiptScreen(receiptId: r.id),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -146,11 +141,9 @@ class HomeScreen extends StatelessWidget {
|
||||
for (final w in result.warnings) {
|
||||
messenger.showSnackBar(SnackBar(content: Text(w)));
|
||||
}
|
||||
unawaited(
|
||||
nav.push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => ReceiptScreen(receiptId: result.receipt.id),
|
||||
),
|
||||
nav.push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => ReceiptScreen(receiptId: result.receipt.id),
|
||||
),
|
||||
);
|
||||
} on EParagonParseException catch (e) {
|
||||
@ -189,11 +182,9 @@ class HomeScreen extends StatelessWidget {
|
||||
if (title == null || title.trim().isEmpty) return;
|
||||
final r = Receipt(id: Ids.next(), title: title.trim());
|
||||
state.addReceipt(r);
|
||||
unawaited(
|
||||
nav.push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => ReceiptScreen(receiptId: r.id),
|
||||
),
|
||||
nav.push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => ReceiptScreen(receiptId: r.id),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
// People screen flows.
|
||||
|
||||
|
||||
import 'package:billsplit/domain/models.dart';
|
||||
import 'package:billsplit/state/app_state.dart';
|
||||
import 'package:billsplit/ui/people_screen.dart';
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
// Receipt screen flows.
|
||||
|
||||
|
||||
import 'package:billsplit/domain/models.dart';
|
||||
import 'package:billsplit/state/app_state.dart';
|
||||
import 'package:billsplit/ui/receipt_screen.dart';
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
// Receipt screen flows.
|
||||
|
||||
|
||||
import 'package:billsplit/domain/models.dart';
|
||||
import 'package:billsplit/state/app_state.dart';
|
||||
import 'package:billsplit/ui/receipt_screen.dart';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user