This commit is contained in:
NATHANIEL ENDICK
2023-02-25 21:01:16 -05:00
parent 1bd7a62d15
commit a0383a7854
3 changed files with 64 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutterfire_ui/auth.dart';
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
import 'package:ruswipeshare/sell.dart';
import 'profile_screen_custom.dart';
import 'main_screen.dart';
@@ -21,13 +22,18 @@ class _HomeScreenState extends State<HomeScreen> {
List<Widget> _buildScreens() => [
const MainScreen(),
const MainScreen(),
const SellScreen(),
const ProfileScreenCustom(),
const MainScreen(),
];
List<PersistentBottomNavBarItem> _navBarsItems() => [
PersistentBottomNavBarItem(icon: const Icon(Icons.shopping_cart), title: "Buy", activeColorPrimary: Colors.blue, inactiveColorPrimary: Colors.grey, inactiveColorSecondary: Colors.purple),
PersistentBottomNavBarItem(
icon: const Icon(Icons.shopping_cart),
title: "Buy",
activeColorPrimary: Colors.blue,
inactiveColorPrimary: Colors.grey,
inactiveColorSecondary: Colors.purple),
PersistentBottomNavBarItem(
icon: const Icon(Icons.attach_money),
title: "Sell",
@@ -67,9 +73,11 @@ class _HomeScreenState extends State<HomeScreen> {
confineInSafeArea: true,
backgroundColor: Colors.white, // Default is Colors.white.
handleAndroidBackButtonPress: true, // Default is true.
resizeToAvoidBottomInset: true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
resizeToAvoidBottomInset:
true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
stateManagement: true, // Default is true.
hideNavigationBarWhenKeyboardShows: true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true.
hideNavigationBarWhenKeyboardShows:
true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true.
decoration: NavBarDecoration(
borderRadius: BorderRadius.circular(10.0),
colorBehindNavBar: Colors.white,
@@ -87,7 +95,8 @@ class _HomeScreenState extends State<HomeScreen> {
curve: Curves.ease,
duration: Duration(milliseconds: 200),
),
navBarStyle: NavBarStyle.style13, // Choose the nav bar style with this property.
navBarStyle:
NavBarStyle.style13, // Choose the nav bar style with this property.
);
}
}