Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Remove CupertinoNavigationBar Backdrop

Is there a way to remove the blur of the CupertinoNavigationBar so it's truly transparent? I got rid of the border and color but there's a blur, for the android AppBar there isn't any blur but for the iOS AppBar it's just there. I check the code for it and there's an ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0) applied to it but how do I remove it?

Code:

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
    ),
),
like image 345
Mohamed Mohamed Avatar asked Dec 23 '22 03:12

Mohamed Mohamed


1 Answers

CupertinoNavigationBar has a border property. If you wish to remove the border, you can do something like this:

CupertinoNavigationBar(
   border: Border(bottom: BorderSide(color: Colors.transparent)),
));
like image 178
Scaraux Avatar answered Jan 06 '23 22:01

Scaraux