-
-
Save sbis04/147965fba8cc1a99131c2b4f2e869543 to your computer and use it in GitHub Desktop.
This file contains 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
class _HomeViewLargeState extends State<HomeViewLarge> { | |
int _index = 0; | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
child: Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
mainAxisAlignment: MainAxisAlignment.start, | |
children: [ | |
Expanded( | |
flex: 2, | |
child: MenuWidget( | |
selectedIndex: _index, | |
onTapped: (selectedIndex) { | |
setState(() { | |
_index = selectedIndex; | |
}); | |
}, | |
), | |
), | |
Expanded( | |
flex: 3, | |
child: IndexedStack( | |
index: _index, | |
children: allDestinations.map<Widget>((Destination destination) { | |
return DestinationView(destination); | |
}).toList(), | |
), | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment