sharansingh00002 / draw

Library to draw in flutter
158 stars 46 forks source link

onPanEnd not accepting null value? #7

Closed chowdhuryrahulc closed 2 years ago

chowdhuryrahulc commented 3 years ago

onPanEnd not accepting null value?

masterdre093 commented 2 years ago

To get pass the null issue i added a isEnd checker. so onPanStart and onPanUpdate i would set it as true. when false it will end the stroke.

class DrawingPoints { Paint paint; Offset points; bool isEnd; //add this DrawingPoints({this.points, this.paint}); }

and in the DrawingPainter use : if (pointsList[x]!.isend) { ... } else {....}