Commit e3dfc160 authored by Tuan Anh Nguyen's avatar Tuan Anh Nguyen
Browse files

fix: use ProfilePage inside BottomNavBar

parent 34111d4b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2,8 +2,9 @@ import 'package:flutter/material.dart';
import 'package:stamped/bottom_nav_bar/model/bottom_nav_bar_item.dart';
import 'package:stamped/pages/collections/collections_page.dart';
import 'package:stamped/pages/home/home_page.dart';
import 'package:stamped/pages/profile/profile_page.dart';

const List<BottomNavBarItem> _NAV_ITEMS = [
final List<BottomNavBarItem> _navItems = [
  BottomNavBarItem(
    label: 'Home',
    icon: Icon(Icons.home),
@@ -29,8 +30,7 @@ const List<BottomNavBarItem> _NAV_ITEMS = [
  BottomNavBarItem(
    label: 'Profile',
    icon: Icon(Icons.person),
    // TODO: replace with the profile page
    child: Placeholder(),
    child: ProfilePage(),
  ),
];

@@ -47,10 +47,10 @@ class _BottomNavBarState extends State<BottomNavBar> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: _NAV_ITEMS[_currentIndex].child,
      body: _navItems[_currentIndex].child,
      bottomNavigationBar: BottomNavigationBar(
        currentIndex: _currentIndex,
        items: _NAV_ITEMS
        items: _navItems
            .map(
              (item) => BottomNavigationBarItem(
                label: item.label,