Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class FavoritesScreen extends StatelessWidget {
return DrinkCard(
key: ValueKey(drink.id),
drink: drink,
onTap: () => context.go(buildDrinkDetailPath(festivalId, drink.id)),
onTap: () => context.push(buildDrinkDetailPath(festivalId, drink.id)),
onFavoriteTap: () => provider.toggleFavorite(drink),
);
},
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/drink_detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class _DrinkDetailScreenState extends State<DrinkDetailScreen> {
unawaited(provider.analyticsService.logStyleViewed(style));

// Navigate to style screen
context.go(buildStylePath(widget.festivalId, style));
context.push(buildStylePath(widget.festivalId, style));
}

Widget _buildDescription(BuildContext context, Drink drink, ThemeData theme) {
Expand Down Expand Up @@ -305,7 +305,7 @@ class _DrinkDetailScreenState extends State<DrinkDetailScreen> {
? Text(drink.breweryLocation)
: null,
trailing: const Icon(Icons.chevron_right),
onTap: () => context.go(buildBreweryPath(widget.festivalId, drink.producer.id)),
onTap: () => context.push(buildBreweryPath(widget.festivalId, drink.producer.id)),
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/drinks_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class _DrinksScreenState extends State<DrinksScreen> {
hint: 'Double tap for more details',
button: true,
child: InkWell(
onTap: () => context.go(buildFestivalInfoPath(widget.festivalId)),
onTap: () => context.push(buildFestivalInfoPath(widget.festivalId)),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Row(
Expand Down Expand Up @@ -489,7 +489,7 @@ class _DrinksScreenState extends State<DrinksScreen> {
}

void _navigateToDetail(BuildContext context, String drinkId) {
context.go(buildDrinkDetailPath(widget.festivalId, drinkId));
context.push(buildDrinkDetailPath(widget.festivalId, drinkId));
}

void _showCategoryFilter(BuildContext context, BeerProvider provider) {
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/drink_list_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DrinkListSection {
return DrinkCard(
key: ValueKey(drink.id),
drink: drink,
onTap: () => context.go(buildDrinkDetailPath(festivalId, drink.id)),
onTap: () => context.push(buildDrinkDetailPath(festivalId, drink.id)),
onFavoriteTap: () => provider.toggleFavorite(drink),
);
},
Expand Down Expand Up @@ -119,7 +119,7 @@ class DrinkListSection {
key: ValueKey(drink.id),
drink: drink,
subtitle: subtitle,
onTap: () => context.go(buildDrinkDetailPath(festivalId, drink.id)),
onTap: () => context.push(buildDrinkDetailPath(festivalId, drink.id)),
onFavoriteTap: () => provider.toggleFavorite(drink),
);
},
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/festival_menu_sheets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ class FestivalSelectorSheet extends StatelessWidget {
router?.go(targetPath);
},
onInfoTap: () {
final router = GoRouter.maybeOf(context);
Navigator.pop(context);
context.go(buildFestivalInfoPath(festival.id));
router?.push(buildFestivalInfoPath(festival.id));
},
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/overflow_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ void _handleMenuSelection(BuildContext context, String value) {
case 'settings':
showSettingsSheet(context);
case 'about':
context.go('/about');
context.push('/about');
}
}
2 changes: 1 addition & 1 deletion test/drink_detail_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void main() {
// Verify similar drink card exists
expect(find.text('Similar IPA'), findsOneWidget);

// NOTE: Navigation uses go_router's context.go() which requires GoRouter
// NOTE: Navigation uses go_router's context.push() which requires GoRouter
// in the widget tree. This is tested in E2E tests instead of unit tests.
});

Expand Down
Loading