ios - Flutter 删除 CupertinoNavigationBar 背景

标签 ios flutter flutter-layout

有没有办法消除 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/

相关文章:

ios - 图像不适合 SKSpriteNode 框架

jquery - iOS jquery .live 问题?

flutter : Strange behavior of Shared Preferences

flutter - 文本字段焦点触发UI的重建

flutter - 自动滚动到交互式查看器中的偏移量

ios - 如何在 UIContainerView 内部导航

ios - 使用 Swift 将信息从 ViewController 传递到 ViewController

dart - 如何从json结构生成Dart代码

dictionary - 在 Dart 中使用 ifAbsent 映射更新方法

flutter - 带有填充的缺口底部导航栏