Bottom Navigation

This commit is contained in:
Nopylacetat
2023-10-20 21:17:14 +02:00
parent 5d31cd8e22
commit c665e76f43

View File

@@ -12,6 +12,7 @@ class SplashPage extends StatefulWidget {
class _SplashPageState extends State<SplashPage> { class _SplashPageState extends State<SplashPage> {
late final Future<bool> loginFuture; late final Future<bool> loginFuture;
int currentPageIndex = 0;
@override @override
void initState() { void initState() {
@@ -50,14 +51,29 @@ class _SplashPageState extends State<SplashPage> {
bottomNavigationBar: BottomNavigationBar( bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.settings), icon: Icon(
label: 'Settings', Icons.home,
color: Colors.white,
), ),
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home', label: 'Home',
), ),
BottomNavigationBarItem(
icon: Icon(
Icons.add_rounded,
color: Colors.white,
),
label: 'Add',
),
BottomNavigationBarItem(
icon: Icon(
Icons.auto_awesome_rounded,
color: Colors.white,
),
label: 'Events',
),
], ],
currentIndex: currentPageIndex,
onTap: (index) => setState(() => currentPageIndex = index),
), ),
); );
} }