4Q-s-r-o / signature

Flutter plugin that creates a canvas for writing down a signature
MIT License
255 stars 85 forks source link

How to stop painting? #25

Closed boucoding closed 4 years ago

boucoding commented 4 years ago

Hi,

I have used this plugin and it really helped me thank you for this work.

but I have a question which is how to stop listening to the signature widget for any painting.

I mean it will be unpaintable.

Thank you,

ethael commented 4 years ago

such feature is not supported by plugin itself as a workaround, you can wrap signature widget to GestureDetector, that would prevent signature plugin from detecting touches

prooshani commented 3 years ago

such feature is not supported by plugin itself as a workaround, you can wrap signature widget to GestureDetector, that would prevent signature plugin from detecting touches

Hi, I had the same issue but GestureDetector was not the correct answer for me! I have wrapped the signature pad with IgnorePointer() and this way easily disabled the signature from being painted when I don't want to.

I think it may be a good feature for this package to define a boolean like Enabled to easily enable/disable the signature canvas from being painted or not.

Hope it helps.