nateshmbhat / touchable

The only flutter library to add gestures and animations to custom shapes you draw on your canvas.
https://pub.dev/packages/touchable
Mozilla Public License 2.0
233 stars 80 forks source link

Swipe effect with drawarc function #31

Open mikemitrofanov opened 3 years ago

mikemitrofanov commented 3 years ago

I've detected inside library, that drawArc receives optional parameter GestureDragUpdateCallback? onPanUpdate, but inside that function it sends null as a parameter to the nested function. Do you plan to implement this functionality somehow or this library is dead?

void drawArc(
    Rect rect,
    double startAngle,
    double sweepAngle,
    bool useCenter,
    Paint paint, {
    HitTestBehavior? hitTestBehavior,
    GestureTapDownCallback? onTapDown,
    PaintingStyle? paintStyleForTouch,
    GestureTapUpCallback? onTapUp,
    GestureLongPressStartCallback? onLongPressStart,
    GestureLongPressEndCallback? onLongPressEnd,
    GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
    GestureForcePressStartCallback? onForcePressStart,
    GestureForcePressEndCallback? onForcePressEnd,
    GestureForcePressPeakCallback? onForcePressPeak,
    GestureForcePressUpdateCallback? onForcePressUpdate,
    GestureDragStartCallback? onPanStart,
    GestureDragUpdateCallback? onPanUpdate,
    GestureDragDownCallback? onPanDown,
    GestureTapDownCallback? onSecondaryTapDown,
    GestureTapUpCallback? onSecondaryTapUp,
  }) {
    _canvas.drawArc(rect, startAngle, sweepAngle, useCenter, paint);
    var arc = Arc(rect, startAngle, sweepAngle, useCenter,
        paint: paint,
        hitTestBehavior: hitTestBehavior,
        gestureMap: TouchCanvasUtil.getGestureCallbackMap(
            onTapDown: onTapDown,
            onTapUp: null,
            onLongPressStart: null,
            onLongPressEnd: null,
            onLongPressMoveUpdate: null,
            onForcePressStart: null,
            onForcePressEnd: null,
            onForcePressPeak: null,
            onForcePressUpdate: null,
            onPanStart: null,
            onPanUpdate: null,
            onPanDown: null,
            onSecondaryTapDown: null,
            onSecondaryTapUp: null));
    _shapeHandler.addShape(arc);
  }
Spooky12 commented 2 years ago

Any news on this ? @nateshmbhat

https://github.com/nateshmbhat/touchable/blob/cbb00fb7efd490c05d194fbdf3e6b2662efd438c/lib/src/touchy_canvas.dart#L488