Skip to content

Instantly share code, notes, and snippets.

@jacobaraujo7
Created December 15, 2020 16:10
Show Gist options
  • Save jacobaraujo7/cd8e9eba2c033ff3a380cade8283ab62 to your computer and use it in GitHub Desktop.
Save jacobaraujo7/cd8e9eba2c033ff3a380cade8283ab62 to your computer and use it in GitHub Desktop.
// 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