Flutter 如何在flatter中创建背景模糊效果,就像Android通知栏中下拉时的背景一样?
我想在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
!!()这不是模糊效果,而是颜色不透明度
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,
),