Swipe constructor
Swipe({})
Implementation
Swipe({
required this.animation,
required Widget child,
required this.screenMaximumPercentage,
required bool hasEnableGestures,
required this.disableAnimations,
this.gestures,
this.animateChild = true,
bool Function(DraggableScrollableNotification)? onNotification,
this.direction = AxisDirection.up,
super.key,
}) : _child = hasEnableGestures
? NotificationListener<DraggableScrollableNotification>(
onNotification: onNotification,
child: GestureDetector(
excludeFromSemantics: true,
onVerticalDragStart: direction.generic() == Axis.vertical
? gestures?.handleDragStart
: null,
onVerticalDragEnd: direction.generic() == Axis.vertical
? gestures?.handleDragEnd
: null,
onVerticalDragUpdate: direction.generic() == Axis.vertical
? gestures?.handleDragUpdate
: null,
onHorizontalDragStart: direction.generic() == Axis.horizontal
? gestures?.handleDragStart
: null,
onHorizontalDragUpdate: direction.generic() == Axis.horizontal
? gestures?.handleDragUpdate
: null,
onHorizontalDragEnd: direction.generic() == Axis.horizontal
? gestures?.handleDragEnd
: null,
child: child,
),
)
: child;