【发布时间】:2019-11-16 05:21:23
【问题描述】:
在使用 Flutter 处理模糊动作时,您可能会遇到在背景上强制模糊效果的问题。通过使用Stack 和内部BackdropFilter。模糊前景视图,影响边界外的其他视图。如何避免这种情况?
//.....
child: new Stack(
fit: StackFit.expand,
children: <Widget>[
new Image.asset(
'assets/bg_img.jpg',
fit: BoxFit.fitHeight,
),
new Container(
color: Colors.transparent,
child: new Center(
child: new Center(
child: new ClipRect(
child: new BackdropFilter(
filter: new ui.ImageFilter.blur(
sigmaX: 6.0,
sigmaY: 6.0,
),
//.....
【问题讨论】: