问题
Is it possible to add blur effect to picture using painting? If so, how can I do this?
回答1:
use this :
Stack(
children: <Widget>[
YourImageWidget(),
new BackdropFilter(
filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
child: new Container(
decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)),
),
),
],
)
来源:https://stackoverflow.com/questions/60217978/how-to-blur-a-specific-position-in-the-picture-using-custompainter-in-flutter