Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a camera filters with flutter?

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

like image 816
yinliang xue Avatar asked May 29 '19 07:05

yinliang xue


1 Answers

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 .

like image 94
Nader Khaled Avatar answered Oct 07 '22 10:10

Nader Khaled