wrapper method

Widget wrapper()

Implementation

Widget wrapper() {
  return GestureDetector(
    behavior: HitTestBehavior.translucent,
    onTapDown: !hasTap
        ? null
        : (_) {
            springDown();
            if (widget.onTapDown != null && isEnabled) widget.onTapDown!(_);
          },
    onTapUp: !hasTap
        ? null
        : (_) {
            spring();
            if (widget.onTapUp != null && isEnabled) widget.onTapUp!(_);
          },
    onTap: !hasTap
        ? null
        : () {
            if (widget.onTap != null && isEnabled) widget.onTap!();
          },
    onTapCancel: !hasTap
        ? null
        : () {
            springUp();
            if (widget.onTapCancel != null && isEnabled) widget.onTapCancel!();
          },
    onSecondaryTapDown: !hasSecondaryTap
        ? null
        : (_) {
            springDown();
            if (widget.onSecondaryTapDown != null && isEnabled) widget.onSecondaryTapDown!(_);
          },
    onSecondaryTapUp: !hasSecondaryTap
        ? null
        : (_) {
            spring();
            if (widget.onSecondaryTapUp != null && isEnabled) widget.onSecondaryTapUp!(_);
          },
    onSecondaryTapCancel: !hasSecondaryTap
        ? null
        : () {
            springUp();
            if (widget.onSecondaryTapCancel != null && isEnabled) widget.onSecondaryTapCancel!();
          },
    onDoubleTap: !hasDoubleTap
        ? null
        : () {
            springDown();
            spring();
            if (widget.onDoubleTap != null && isEnabled) widget.onDoubleTap!();
          },
    onLongPress: !hasLongPress
        ? null
        : () {
            if (widget.onLongPress != null && isEnabled) widget.onLongPress!();
          },
    onLongPressStart: !hasLongPress
        ? null
        : (_) {
            springDown();
            if (widget.onLongPressStart != null && isEnabled) widget.onLongPressStart!(_);
          },
    onLongPressMoveUpdate: !hasLongPress
        ? null
        : (_) {
            if (widget.onLongPressMoveUpdate != null && isEnabled) widget.onLongPressMoveUpdate!(_);
          },
    onLongPressUp: !hasLongPress
        ? null
        : () {
            spring();
            if (widget.onLongPressUp != null && isEnabled) widget.onLongPressUp!();
          },
    onLongPressEnd: !hasLongPress
        ? null
        : (_) {
            if (widget.onLongPressEnd != null && isEnabled) widget.onLongPressEnd!(_);
          },
    onVerticalDragDown: !hasVerticalDrag
        ? null
        : (_) {
            if (widget.onVerticalDragDown != null && isEnabled) widget.onVerticalDragDown!(_);
          },
    onVerticalDragStart: !hasVerticalDrag
        ? null
        : (_) {
            springDown();
            if (widget.onVerticalDragStart != null && isEnabled) widget.onVerticalDragStart!(_);
          },
    onVerticalDragUpdate: !hasVerticalDrag
        ? null
        : (_) {
            if (widget.onVerticalDragUpdate != null && isEnabled) widget.onVerticalDragUpdate!(_);
          },
    onVerticalDragEnd: !hasVerticalDrag
        ? null
        : (_) {
            spring();
            if (widget.onVerticalDragEnd != null && isEnabled) widget.onVerticalDragEnd!(_);
          },
    onVerticalDragCancel: !hasVerticalDrag
        ? null
        : () {
            springUp();
            if (widget.onVerticalDragCancel != null && isEnabled) widget.onVerticalDragCancel!();
          },
    onHorizontalDragDown: !hasHorizontalDrag
        ? null
        : (_) {
            if (widget.onHorizontalDragDown != null && isEnabled) widget.onHorizontalDragDown!(_);
          },
    onHorizontalDragStart: !hasHorizontalDrag
        ? null
        : (_) {
            springDown();
            if (widget.onHorizontalDragStart != null && isEnabled) widget.onHorizontalDragStart!(_);
          },
    onHorizontalDragUpdate: !hasHorizontalDrag
        ? null
        : (_) {
            if (widget.onHorizontalDragUpdate != null && isEnabled) widget.onHorizontalDragUpdate!(_);
          },
    onHorizontalDragEnd: !hasHorizontalDrag
        ? null
        : (_) {
            spring();
            if (widget.onHorizontalDragEnd != null && isEnabled) widget.onHorizontalDragEnd!(_);
          },
    onHorizontalDragCancel: !hasHorizontalDrag
        ? null
        : () {
            springUp();
            if (widget.onHorizontalDragCancel != null && isEnabled) widget.onHorizontalDragCancel!();
          },
    onForcePressStart: !hasForcePress
        ? null
        : (_) {
            springDown();
            if (widget.onForcePressStart != null && isEnabled) widget.onForcePressStart!(_);
          },
    onForcePressPeak: !hasForcePress
        ? null
        : (_) {
            if (widget.onForcePressPeak != null && isEnabled) widget.onForcePressPeak!(_);
          },
    onForcePressUpdate: !hasForcePress
        ? null
        : (_) {
            if (widget.onForcePressUpdate != null && isEnabled) widget.onForcePressUpdate!(_);
          },
    onForcePressEnd: !hasForcePress
        ? null
        : (_) {
            spring();
            if (widget.onForcePressEnd != null && isEnabled) widget.onForcePressEnd!(_);
          },
    onPanDown: !hasPan
        ? null
        : (_) {
            if (widget.onPanDown != null && isEnabled) widget.onPanDown!(_);
          },
    onPanStart: !hasPan
        ? null
        : (_) {
            springDown();
            if (widget.onPanStart != null && isEnabled) widget.onPanStart!(_);
          },
    onPanUpdate: !hasPan
        ? null
        : (_) {
            if (widget.onPanUpdate != null && isEnabled) widget.onPanUpdate!(_);
          },
    onPanEnd: !hasPan
        ? null
        : (_) {
            spring();
            if (widget.onPanEnd != null && isEnabled) widget.onPanEnd!(_);
          },
    onPanCancel: !hasPan
        ? null
        : () {
            springUp();
            if (widget.onPanCancel != null && isEnabled) widget.onPanCancel!();
          },
    onScaleStart: !hasScale
        ? null
        : (_) {
            springDown();
            if (widget.onScaleStart != null && isEnabled) widget.onScaleStart!(_);
          },
    onScaleUpdate: !hasScale
        ? null
        : (_) {
            if (widget.onScaleUpdate != null && isEnabled) widget.onScaleUpdate!(_);
          },
    onScaleEnd: !hasScale
        ? null
        : (_) {
            spring();
            if (widget.onScaleEnd != null && isEnabled) widget.onScaleEnd!(_);
          },
    child: widget.uiChild,
  );
}