有没有办法消除 CupertinoNavigationBar 的模糊,使其真正透明?我摆脱了边框和颜色,但有一个模糊,对于 android AppBar 没有任何模糊但对于 iOS AppBar 它就在那里。我检查了它的代码,发现应用了一个 ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0)
但我该如何删除它?
代码:
CupertinoNavigationBar(
backgroundColor: Colors.transparent,
border: Border.all(
color: Colors.transparent,
width: 0.0,
style: BorderStyle.none
),
leading: IconButton(
icon: Icon(
Icons.close,
color: Colors.red,
),
onPressed: () {
Navigator.pop(context);
}),
automaticallyImplyLeading: false,
trailing: IconButton(
icon: Icon(
Icons.refresh,
color: Colors.blue,
),
onPressed: widget.onRestart
),
),
最佳答案
CupertinoNavigationBar 有一个 border
属性。如果你想删除边框,你可以这样做:
CupertinoNavigationBar(
border: Border(bottom: BorderSide(color: Colors.transparent)),
));
关于ios - Flutter 删除 CupertinoNavigationBar 背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53177115/