How to blur a specific position in the picture using CustomPainter in flutter

旧城冷巷雨未停 提交于 2020-03-05 00:22:37

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!