Created
December 15, 2020 16:10
-
-
Save jacobaraujo7/cd8e9eba2c033ff3a380cade8283ab62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// StartPage | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
// Nested Pages | |
body: RouterOutlet(), | |
// bottomBar | |
bottomNavigationBar: BottomNavigationBar( | |
currentIndex: selectedIndex, | |
onTap: (index) { | |
if (index == 0) { | |
Modular.to.navigate('/start/home/'); | |
} else if (index == 1) { | |
Modular.to.navigate('/start/config'); | |
} else if (index == 2) { | |
Modular.to.navigate('/start/perfil'); | |
} | |
}, | |
items: [ | |
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'), | |
BottomNavigationBarItem(icon: Icon(Icons.settings), label: 'Config'), | |
BottomNavigationBarItem(icon: Icon(Icons.account_balance), label: 'Perfil'), | |
], | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment