如何在bottomBarNavigation中制作擴展浮動彈出視窗,如下圖所示

uj5u.com熱心網友回復:
您可以通過以下方式實作BottomNavigationBar:
BottomNavigationBar(
type: BottomNavigationBarType.fixed,
currentIndex: 0,
items: [
new BottomNavigationBarItem(
icon: new Icon(Icons.add),
label: "Home",
),
new BottomNavigationBarItem(
icon: new Icon(Icons.add),
label: "Publish",
),
new BottomNavigationBarItem(
icon: new Icon(Icons.delete),
label: "Profile",
)
],
onTap: (index) {
if (index == 1) {
print("Call");
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
barrierColor: Colors.transparent,
elevation: 0,
builder: (builder) {
return Padding(
padding: const EdgeInsets.only(bottom: 58 32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ElevatedButton(onPressed: () {}, child: Text('1')),
ElevatedButton(onPressed: () {}, child: Text('2')),
ElevatedButton(onPressed: () {}, child: Text('3')),
],
),
);
});
}
},
)

uj5u.com熱心網友回復:
您可以使用https://pub.dev/packages/animated_floating_buttons包來實作您的功能
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/529381.html
標籤:扑镖颤振布局
