Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 如何在flatter中创建背景模糊效果,就像Android通知栏中下拉时的背景一样?_Flutter_Mobile - Fatal编程技术网

Flutter 如何在flatter中创建背景模糊效果,就像Android通知栏中下拉时的背景一样?

Flutter 如何在flatter中创建背景模糊效果,就像Android通知栏中下拉时的背景一样?,flutter,mobile,Flutter,Mobile,我想在Android中创建如下背景效果。我使用了背景滤镜并创建了模糊效果,但它不是理想的效果 !!()这不是模糊效果,而是颜色不透明度 Opacity( opacity: animation.value * 0.5, child: Container( height: MediaQuery.of(context).size.height, width: MediaQuery.of(conte

我想在Android中创建如下背景效果。我使用了背景滤镜并创建了模糊效果,但它不是理想的效果


!!()

这不是模糊效果,而是颜色不透明度

 Opacity(
            opacity: animation.value * 0.5,
            child: Container(
              height: MediaQuery.of(context).size.height,
              width: MediaQuery.of(context).size.width,
              color: Colors.black,
            ),
          ), 
如果你不需要它,你可以用它

Container(
              foregroundDecoration: BoxDecoration(
                color: Colors.black.withOpacity(0.5)
              ),
              child: yourChild,
            ),

这不是模糊效果,而是颜色不透明度

 Opacity(
            opacity: animation.value * 0.5,
            child: Container(
              height: MediaQuery.of(context).size.height,
              width: MediaQuery.of(context).size.width,
              color: Colors.black,
            ),
          ), 
如果你不需要它,你可以用它

Container(
              foregroundDecoration: BoxDecoration(
                color: Colors.black.withOpacity(0.5)
              ),
              child: yourChild,
            ),