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

lines.length > 0 #14

Closed c0c4i closed 3 years ago

c0c4i commented 3 years ago

Hello, I'm using this package but I have this problem below while writing a signature.

'package:hand_signature/src/utils.dart': Failed assertion: line 369 pos 12: 'lines.length > 0': is not true.
The relevant error-causing widget was HandSignaturePainterView

This is my code to show widget

Container(
  width: double.infinity,
  height: 250,
  child: HandSignaturePainterView(
    control: control,
    decoration: ... ,
    type: SignatureDrawType.line,
    width: 3,
  ),
)

And this is style of HandSignatureControl

final HandSignatureControl control = new HandSignatureControl(
    threshold: 0.01,
    smoothRatio: 0.65,
    velocityRange: 2.0,
  );

Do you have any solution?

RomanBase commented 3 years ago

Hi, can you provide more info when this error occurs (during drawing, on touch up, export) ?

c0c4i commented 3 years ago

Yep sorry, it occurs during drawing

RomanBase commented 3 years ago

Solved in 2.1.0+2