问题1:如何在浮动操作按钮周围添加一个凹口,使其看起来像一个底部应用程序条(形状为CircularNotchedRectangle()),但行为却像底部工作表(可以拖动以取消)
问题2:如何使底页不可忽略,但仍可拖动。(类似于android的底单)
问题3:底单窥视高度,底单可以忽略,但也可以扩展(同样,就像android的底单一样)
有没有可能实现我上面列出的内容?或者我不走运,不得不使用第三方库?(如果有的话?)

发布于 2020-10-06 22:50:54
希望对您有所帮助:)
Scaffold(
floatingActionButtonLocation: FloatingActionButtonLocation.startDocked, //specify the location of the FAB
floatingActionButton: FloatingActionButton(
backgroundColor: Colors.blue,
onPressed: () {
print('OK');
},
tooltip: "start FAB",
child: Container(
margin: EdgeInsets.all(15.0),
child: Icon(Icons.add),
),
elevation: 4.0,
),
bottomNavigationBar: BottomAppBar(
child: Container(
color: mycolor,
height: 35,
),
)
);发布于 2020-10-06 23:09:57
您也可以使用此技术
Scaffold(
backgroundColor: myBackgroundColor,
floatingActionButtonLocation: FloatingActionButtonLocation.startDocked, //specify the location of the FAB
floatingActionButton: CircleAvatar(
radius: 32,
backgroundColor: myBackgroundColor,
child: Padding(
padding: EdgeInsets.all(1),
child: FloatingActionButton(
backgroundColor: MyColor.textColor,
onPressed: () {
print('OK');
},
child: Container(
margin: EdgeInsets.all(15.0),
child: Icon(Icons.add),
),
elevation: 4.0,
),
),
),
bottomNavigationBar: BottomAppBar(
child: Container(
color: MyColor.textColor,
height: 35,
),
)
);https://stackoverflow.com/questions/52257152
复制相似问题