[英]How to remove the bottom border outline in fab flutter
我想在 flutter 的底部導航欄中有一個帶有白色邊框的工廠。 但是,我想擺脫圖標周圍的某種邊框輪廓
如您所見,按鈕周圍有某種輪廓。 我怎樣才能刪除它? 這是我到目前為止寫的代碼,
floatingActionButton: Container(
height: 70,
width: 70,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
offset: const Offset(0, -2),
color: Colors.grey.shade200,
spreadRadius: 1,
blurRadius: 2)
],
border: Border.all(color: Colors.white, width: 6.0),
shape: BoxShape.circle,
color: Colors.red),
child: Material(
elevation: 0,
borderOnForeground: false,
shadowColor: Colors.transparent,
color: Colors.transparent,
borderRadius: BorderRadius.circular(100),
clipBehavior: Clip.hardEdge,
child: InkWell(
onTap: () {},
child: const Icon(
Icons.add,
color: Colors.white,
size: 21,
),
))),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomNavigationBar(
backgroundColor: Colors.white,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.call),
label: 'Calls',
),
BottomNavigationBarItem(
icon: Icon(Icons.chat),
label: 'Chats',
),
],
),
我建議我的解決方案。 有用。
floatingActionButton: Container(
height: 70,
width: 70,
decoration: BoxDecoration(
// boxShadow: [
// BoxShadow(
// offset: const Offset(0, -2),
// color: Colors.grey.shade200,
// spreadRadius: 1,
// blurRadius: 2)
// ],
border: Border.all(color: Colors.transparent, width: 8.0),
shape: BoxShape.circle,
color: Colors.white),
child: Container(
decoration: const BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: Material(
elevation: 0,
borderOnForeground: false,
shadowColor: Colors.transparent,
color: Colors.transparent,
borderRadius: BorderRadius.circular(100),
clipBehavior: Clip.hardEdge,
child: InkWell(
onTap: () {},
child: const Icon(
Icons.add,
color: Colors.white,
size: 21,
),
)),
)),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomNavigationBar(
backgroundColor: Colors.white,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.call),
label: 'Calls',
),
BottomNavigationBarItem(
icon: Icon(Icons.chat),
label: 'Chats',
),
],
),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.