mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-19 03:54:21 +01:00
Drop five redundant unawaited() wrappers around Navigator.push
Navigator.push is annotated @awaitNotRequired, so these now trip unnecessary_unawaited and failed the CI-mirror's flutter analyze -- which blocked every push to this repo regardless of what the commit changed. flutter analyze: no issues. flutter test: 553 passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C7yZz45ezmzCB89Cv5gAtZ
This commit is contained in:
parent
e80ae41e1c
commit
4e3778823f
@ -101,12 +101,10 @@ class _CalendarScreenState extends State<CalendarScreen> {
|
||||
|
||||
/// Opens [HistoryScreen] pre-filtered to the tapped day.
|
||||
void _onDaySelected(DateTime day) {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => HistoryScreen(
|
||||
initialDateRange: DateTimeRange(start: day, end: day),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => HistoryScreen(
|
||||
initialDateRange: DateTimeRange(start: day, end: day),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
/// screen: "I can open the diet app on my phone and fill meal I ate."
|
||||
library;
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'package:crdt_sync/crdt_sync.dart';
|
||||
@ -323,35 +322,27 @@ class _LogMealScreenState extends State<LogMealScreen>
|
||||
}
|
||||
|
||||
void _onOpenHistory() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const HistoryScreen()),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const HistoryScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
void _onOpenCalendar() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const CalendarScreen()),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const CalendarScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
void _onOpenFoodBank() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const FoodBankScreen()),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const FoodBankScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
void _onOpenSettings() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => SettingsScreen(httpClient: widget.httpClient),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => SettingsScreen(httpClient: widget.httpClient),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user