fix: navigation is more consistant

This commit is contained in:
2026-08-05 10:57:53 +02:00
parent 2896074ce4
commit 2c734493cf
10 changed files with 159 additions and 78 deletions
+5 -5
View File
@@ -53,13 +53,13 @@ class _BarScreenViewState extends State<BarScreenView> {
actions: [
IconButton(
tooltip: l10n.manageProducts,
onPressed: () => context.go('/products'),
onPressed: () => context.push('/products'),
icon: const Icon(Icons.inventory_2_outlined),
),
const SizedBox(width: 6),
IconButton(
tooltip: l10n.tabHistory,
onPressed: () => context.go('/history'),
onPressed: () => context.push('/history'),
icon: const Icon(Icons.history_rounded),
),
const SizedBox(width: 6),
@@ -71,7 +71,7 @@ class _BarScreenViewState extends State<BarScreenView> {
const SizedBox(width: 6),
IconButton(
tooltip: l10n.settings,
onPressed: () => context.go('/settings'),
onPressed: () => context.push('/settings'),
icon: const Icon(Icons.settings),
),
if (context.watch<PinLockViewModel>().isPinSet) ...[
@@ -230,7 +230,7 @@ class _ProductGrid extends StatelessWidget {
),
const SizedBox(height: 20),
FilledButton.icon(
onPressed: () => context.go('/products/new'),
onPressed: () => context.push('/products/new'),
icon: const Icon(Icons.add),
label: Text(l10n.addProduct),
),
@@ -324,7 +324,7 @@ class _ProductGrid extends StatelessWidget {
enabled: hasSelectedTab,
onTap: () => onProductTap(product),
onLongPress: () =>
context.go('/products/${product.id}/edit'),
context.push('/products/${product.id}/edit'),
);
},
);