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

526

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)),
        ),
      ),

    ],
  )
Share:
526
haneen saadeh
Author by

haneen saadeh

Updated on November 20, 2022

Comments

  • haneen saadeh
    haneen saadeh over 1 year

    Is it possible to add blur effect to picture using painting? If so, how can I do this?

    enter image description here

    • Abhijith Sasikumar
      Abhijith Sasikumar over 4 years
      Provide more details like what you have tried so far or what's blocking you.
    • Viren V Varasadiya
      Viren V Varasadiya over 4 years
      add more description and details. what exactly you want and also add code whatever you tried.
    • haneen saadeh
      haneen saadeh over 4 years
      I want the user to be able to blur the image using the drawing
    • pskink
      pskink over 4 years
      start with this
    • haneen saadeh
      haneen saadeh over 4 years
      Is there a clear way to draw a blurry line with a brush like this video? firebasestorage.googleapis.com/v0/b/my-story-a1b2a.appspot.c‌​om/… @pskink
    • pskink
      pskink over 4 years
      i have no idea what you mean
    • haneen saadeh
      haneen saadeh over 4 years
    • Salman Shaikh
      Salman Shaikh over 3 years
      Did you get your answer? @haneensaadeh
  • pskink
    pskink over 4 years
    BackdropFilter? in CustomPainter?
  • dev001
    dev001 over 4 years
    Of course not, replace CustomPainter with YourImageWidget().
  • pskink
    pskink over 4 years
    he asks: "How to blur a specific position in the picture using CustomPainter in flutter"
  • haneen saadeh
    haneen saadeh over 4 years
    I want the user to be able to blur the image using the drawing, not statically