Try this one I have used in my music app. one of the most straightforward solutions is to wrap widgets in columns in the bottom bar of the app at the root level.
return Scaffold(
body: tabs[currentTabIndex],
backgroundColor: ColorConstants.kBackGround,
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: const EdgeInsets.all(10),
width: 100.w,
height: 60,
alignment: Alignment.center,
color: Colors.black38,
child: Text(
"Mini Player",
style: Theme.of(context).textTheme.headline3,
),
),
BottomNavigationBar(
currentIndex: currentTabIndex,
elevation: 0,
onTap: (currentIndex) => setState(() {
currentTabIndex = currentIndex;
}),
selectedLabelStyle: const TextStyle(color: Colors.white),
selectedItemColor: ColorConstants.kDarkFontColor,
backgroundColor: ColorConstants.kBackGround,
showSelectedLabels: false,
showUnselectedLabels: false,
items: const [
BottomNavigationBarItem(icon: Icon(Icons.home), label: ""),
BottomNavigationBarItem(icon: Icon(Icons.search), label: ""),
BottomNavigationBarItem(icon: Icon(Icons.library_books), label: "")
],
)
],
),
);
also you can checkout this video for the open and close mini player when the song start youtube
