Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent fill on zoom #1

Open
AdamovicBoban opened this issue May 24, 2021 · 2 comments
Open

Prevent fill on zoom #1

AdamovicBoban opened this issue May 24, 2021 · 2 comments

Comments

@AdamovicBoban
Copy link

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

@garlen-javier
Copy link
Owner

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.

@AdamovicBoban
Copy link
Author

AdamovicBoban commented May 24, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants