【发布时间】:2021-06-08 14:29:55
【问题描述】:
你好朋友,我正在开发一个应用程序,这个应用程序有bottomAppBar和嵌入在bottomAppBar中的FloatingAction。当我将位置 SpeedDial Widget 设置为 centerDocker 然后我按下按钮时,它开始到默认位置,这是首先创建的 注意:我正在为 FAB 使用 SpeedDial 小部件
Here , there is a video to explain everything
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: mySpeedDial(),
SpeedDial mySpeedDial() {
return SpeedDial(
curve: Curves.bounceIn,
elevation: 20,
icon: Icons.add,
buttonSize: 75,
backgroundColor: Colors.white,
closeManually: false,
visible: true,
overlayOpacity: 0,
iconTheme: IconThemeData(
color: Colors.black,
),
children: [
SpeedDialChild(
child: Icon(
Icons.camera_alt_sharp,
color: Colors.black,
),
backgroundColor: Colors.white,
onTap: () {
print("tapped");
kameradanFotograf().then((value) {
if (dosya != null) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => yuklemeSayfasi(
kullanici: anlikKullanici,
dosya: dosya,
)));
} else {
sayfaKontrol.jumpToPage(0);
}
});
//displayUploadScreen();
}),
SpeedDialChild(
child: Icon(
Icons.add_photo_alternate,
color: Colors.black,
),
backgroundColor: Colors.white,
onTap: () {
print("tapped");
galeridenFotograf().then((value) {
if (dosya != null) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => yuklemeSayfasi(
kullanici: anlikKullanici,
dosya: dosya,
)));
} else {
sayfaKontrol.jumpToPage(0);
}
});
//displayUploadScreen();
}),
],
);
}
【问题讨论】:
标签: flutter floating-action-button