Flutter 缺口底杆颤振
我刚刚开始使用Flatter,我想创建一个带有FAB和凹口的底部appbar 我的脚手架代码如下:Flutter 缺口底杆颤振,flutter,dart,flutter-layout,Flutter,Dart,Flutter Layout,我刚刚开始使用Flatter,我想创建一个带有FAB和凹口的底部appbar 我的脚手架代码如下: return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
bottomNavigationBar: BottomAppBar(
shape: CircularNotchedRectangle(),
color: Colors.blueGrey,
notchMargin: 2.0,
clipBehavior: Clip.antiAlias,
child: BottomNavigationBar(items: [
BottomNavigationBarItem(
icon: Icon(Icons.cancel), title: Text("Title")),
BottomNavigationBarItem(
icon: Icon(Icons.cancel), title: Text("Title")),
]),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
);
返回脚手架(
appBar:appBar(
标题:文本(widget.title),
),
正文:中(
mainAxisAlignment:mainAxisAlignment.center,
儿童:[
正文(
“您已经按了这么多次按钮:”,
),
正文(
“$”计数器“,
样式:Theme.of(context).textTheme.display1,
),
],
),
),
浮动操作按钮:浮动操作按钮(
按下时:\ u递增计数器,
工具提示:“增量”,
子:图标(Icons.add),
),
bottomNavigationBar:BottomAppBar(
形状:CircularNotchedRectangle(),
颜色:颜色。蓝灰色,
notchMargin:2.0,
clipBehavior:Clip.antiAlias,
子项:底部导航栏(项:[
底部导航气压计(
图标:图标(Icons.cancel),标题:文本(“标题”),
底部导航气压计(
图标:图标(Icons.cancel),标题:文本(“标题”),
]),
),
floatingActionButtonLocation:floatingActionButtonLocation.centerDocked,
);
但是,此代码不显示槽口。它确实对齐了晶圆厂,并在应用程序栏中显示了元素,但没有缺口。我刚刚运行了你的代码(进行了一些修复),它在我这边工作。您可能希望使用更大的切口边距来查看效果
此外,屏幕截图也有助于询问用户界面问题
这是我的模拟器的屏幕截图你能添加一张你想要的图片吗?