Skip to content

Commit

Permalink
Add tabs routes
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Nov 30, 2023
1 parent 8096083 commit ac8c200
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions example/lib/src/feature/shop/widget/shop_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'package:example/src/feature/shop/widget/basket_screen.dart';
import 'package:example/src/feature/shop/widget/catalog_screen.dart';
import 'package:example/src/feature/shop/widget/favorites_screen.dart';
import 'package:flutter/material.dart';
import 'package:octopus/octopus.dart';

Expand Down Expand Up @@ -127,7 +130,7 @@ class _ShopScreenState extends State<ShopScreen> {

@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
/* appBar: AppBar(
title: Text(
_tab.map<String>(
catalog: () => 'Catalog',
Expand All @@ -136,9 +139,12 @@ class _ShopScreenState extends State<ShopScreen> {
),
key: ValueKey(_tab.index),
),
),
// TODO(plugfox): implement nested navigation
body: OctopusNavigator.nested(),
), */
body: switch (_tab) {
ShopTabsEnum.catalog => const CatalogScreen(),
ShopTabsEnum.basket => const BasketScreen(),
ShopTabsEnum.favorites => const FavoritesScreen(),
},
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
Expand Down

0 comments on commit ac8c200

Please sign in to comment.