RomanBase / hand_signature

A Flutter plugin providing signature pad for drawing smooth signatures.
https://pub.dev/packages/hand_signature
MIT License
108 stars 25 forks source link

Draw simple dots in signature #4

Closed thirteenthstep closed 4 years ago

thirteenthstep commented 4 years ago

Currently it is not possible to draw a simple dot, e.g. to abbreviate your first name.

RomanBase commented 4 years ago

Hi, dots are supported with every SignatureDrawType. Try to adjust width and maxWidth and use latest version of library.

thirteenthstep commented 4 years ago

Single dot by Tap does not work on any emulator or device I tried so far. Reason for this seems to be the pan event handling in HandSignaturePainterView lines 45 - 49: Pan Events 'onStart', 'onUpdate' and 'onEnd' are handled, but a single tap always results in 'onDown', which is ignored.

Edit: This workaround enables dots by tap:

GestureDetector(
    onTapDown: (TapDownDetails details) => control.startPath(details.localPosition),
    onTapUp: (TapUpDetails details) => control.closePath(),
    child: HandSignaturePainterView(
        control: control,
     ),
),
RomanBase commented 4 years ago

It seems like it's just emulator problem, but in next version TapGestureRecognizer will be added. This is already fixed in master branche, if you want to try it..

In your workaround can be problem with multitouch and accidental screen touches.

thirteenthstep commented 4 years ago

I was able to reproduce the problem on following devices: iPad Air and Samsung Tablet. Current master is working fine, thank you very much (: