FloodFill_Image
FloodFill_Image copied to clipboard
Prevent fill on zoom
Hi,
how to prevent filling when zoom is started ? can you help me ?
InteractiveViewer( panEnabled: true, minScale: 1, maxScale: 4, child: SizedBox( width: 300, height: 300, child: FloodFillImage( imageProvider: NetworkImage("https://previews.123rf.com/images/inhasemiankova/inhasemiankova1606/inhasemiankova160600012/68493780-vector-coloring-simple-sun-round-mandala-for-children.jpg"), fillColor: _fillColor, avoidColor: [Colors.transparent, Colors.black], tolerance: 100, ), ), ),
You could use the onInteractionStart callback from InteractiveViewer See: https://api.flutter.dev/flutter/widgets/InteractiveViewer-class.html and disable the fill function with "isFillActive" parameter set to false.
Hi Garlen,
Please give me an example in the code, I am almost new to flutter . Thank You
i think the gesture need to be changed, it would be better if the fill should be done by onTapUp or onLongPress