I\'ve added a BottomAppBar
to scaffold in a materialApp, and to that I\'ve added a fab with a inset at the center. The code looks somewhat like this
I was able to achieve the desired behavior by also setting the resizeToAvoidBottomInset flag to false.
@override
Widget build(BuildContext context) {
return Scaffold(
extendBody: true,
resizeToAvoidBottomInset: false,
body: IndexedStack(
children: [],
index: _selectedTab,
),
bottomNavigationBar: ClipRRect(
clipBehavior: Clip.antiAlias,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.0),
topRight: Radius.circular(16.0)
),
child: BottomNavigationBar(
backgroundColor: Colors.white,
elevation: 10,
type: BottomNavigationBarType.fixed,
items: [],
currentIndex: _selectedTab,
),
),
);
}
Edit: keep in mind that you may have to manually set the bottom insets by using MediaQuery.of(context)