我正在尝试在底部导航栏的中间添加一个浮动操作按钮。问题是边框没有出现,浮动操作按钮和图标中的边距也不符合我的要求。
这是问题的图片。 实现的图像
这是我想要的 图片 所需图片
代码
bottomNavigationBar: SafeArea(child: _buildBottomBar(context)),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: CircularGradientButton(
tooltip: 'Increment',
child: new Image.asset(UIData.cameraIcon),
gradient: LinearGradient(colors: <Color>[
Color.fromARGB(255, 17, 153, 142),
Color.fromARGB(255, 56, 239, 125)
]),
callback: () => openCamera(),
//_optionsDialogBox(),
elevation: 2.0,
),
Widget _buildBottomBar(BuildContext context) {
return Material(
color: Colors.white,
child: TabBar(
isScrollable: false,
unselectedLabelColor: Colors.white.withOpacity(0.3),
indicatorColor: Colors.white,
tabs: <Tab>[
new Tab(
// set icon to the tab
icon: Image.asset(
_tabController.index == 0 ? UIData.mapIconActive : UIData.mapIcon,
width: 30,
height: 30,
),
), …Run Code Online (Sandbox Code Playgroud)