How to check if signature is empty or has a minimum sign.

Good evening. I would like to check if a signature is empty or (better) if it has a minimum signature. For example, I don't want to accept an empy signature or a signature with only few pixels in it (for example i wouldn't accept one dot or a small line).

Thank you.

3 Replies 1 reply marked as answer

MN Meikanda Nayanar Syncfusion Team March 1, 2021 07:11 AM UTC

Hi Fabio,

Thank you for contacting us.

We like to confirm your requirements clearer. If we expose the offset collection of the drawn touchpoints in the signature pad, will that satisfy your requirement? If that offset collection is empty you can know that the signature pad is empty and the minimum number of items in the collection means, there is not much of drawings made to make a complete a signature.

Please let me know if you have any other questions.

Thanks

Meikandan

 


Marked as answer

FP Fabio Pagano March 1, 2021 10:18 AM UTC

Yes, the proposed solution should satisfy my request.

Thank you.


MN Meikanda Nayanar Syncfusion Team March 3, 2021 05:28 PM UTC

Hi Fabio,

Thank you for your response.

We will consider this implementation in the SignaturePad and in the meanwhile, you can use the onSignStart call back in the signature pad to identify whether the signature pad is empty or not. You can get the code snippets for this from the below link

https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/signature_pad/getting_started/signature_pad_getting_started.dart

In this sample, we are setting a boolean value in the onSignStart callback before converting the signature pad as an image. If the value is true, then there is a signature updated in the signature pad otherwise it is empty.

Please let me know if you need any further assistance in this.

Thanks

Meikandan


Loader.
Up arrow icon