I want to a dashboard with app bar and bottom navigation bar. But when i add listview or pageview in body(Scaffold) the content is overlapped with bottom navigation bar.
I have set the padding widget and aspect ratio widget but the content height vary in different screen size.
BottomNavigationBar(
backgroundColor: Colors.white,
currentIndex: _currentIndex,
onTap: (index) {
setState(() {
_currentIndex = index;
});
},
items: [
BottomNavigationBarItem(
icon: new Icon(Icons.chat_bubble),
title: new TextView(
'Conversations',
size: 16.0,
color: Colors.black,
fontWeight: FontWeight.normal,
),
),
BottomNavigationBarItem(
icon: new Icon(Icons.dashboard),
title: new TextView(
'Matchboard',
size: 16.0,
color: Colors.black,
fontWeight: FontWeight.normal,
),
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
title: TextView(
'Match-o-Meter',
size: 20.0,
color: Colors.black,
fontWeight: FontWeight.normal,
))
],
),
body: Column(
children: <Widget>[
Expanded(
child: IndexedStack(index: _currentIndex, children: <Widget>[
CouplingMatches(),
MatchBoard(),
MoMPage(),
]),
),
],
),
I want the body content in between appbar and bottom navigation bar but i getting the result as:
i have scroll to down but content is overlapping with bottom navigation bar
Some suggested putting BottomNavigationView and RecylerView in content layout (which implement app:layout_behavior="@string/appbar_scrolling_view_behavior" ) to avoid overlapping.
Bottom navigation bars make it easy for users to explore and switch between top-level views in a single tap. They should be used when an application has three to five top-level destinations.
Wrap the body of your Scaffold
in a SafeArea
widget.
Please try to use these
resizeToAvoidBottomInset: false,
resizeToAvoidBottomPadding: false,
Change the parameter until you don't get output and remembar it's a property of Scafflod.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With