Open abdulwahid24 opened 5 years ago
You can do it like so... each page is held in a list. You might ask this question on stackoverflow for a better response more associated with Flutter UI.
int _index = 0;
final List<Widget> _pages = [
SearchFilterData(),
SpeakWidget(),
QAWidget(),
];
Widget build(BuildContext context) {
return Scaffold(
body: _pages[_index],
bottomNavigationBar: FancyBottomNavigation(
tabs: [
TabData(iconData: Icons.search,title: "Search"),
TabData(iconData: Icons.language,title: "Speak"),
TabData(iconData: Icons.question_answer,title: "Q&A"),
],
onTabChangedListener: (position){
setState(() {
_index = position;
});
},
),
);
}
Currently I have many pages in my app and I want to keep the bottom navigation bar as a permanent widget throughout the app.
Is there any way we can achieve this?