How to do a camera filters with flutter?

5,327

There is no method or an object in the camera plugin that can do this task. But I think you can do this effect by wrapping the CameraPreview Widget in a ShaderMask Widget . Then you can add filters by by using a LinearGradient Widget and your custom colours in the shaderCallBack Method and enhance it by specifying a BlendMode in the blendmode named parameter .

Share:
5,327
yinliang xue
Author by

yinliang xue

Updated on December 11, 2022

Comments

  • yinliang xue
    yinliang xue over 1 year

    How can I implement a real-time camera filter in Flutter?

  • Hamza Ali
    Hamza Ali almost 3 years
    Then how can I save that image with shadermask? I have tried but its only saving gradient not the camera view