getGesturesVertical method
Map<Type, GestureRecognizerFactory<GestureRecognizer> >
getGesturesVertical(
- BuildContext context
override
Implementation
@override
Map<Type, GestureRecognizerFactory> getGesturesVertical(
BuildContext context) {
final Map<Type, GestureRecognizerFactory> gestures =
<Type, GestureRecognizerFactory>{};
if (!enableGestures) {
return gestures;
}
gestures[_ThumbPressGestureRecognizer] =
GestureRecognizerFactoryWithHandlers<_ThumbPressGestureRecognizer>(
() => _ThumbPressGestureRecognizer(
debugOwner: this,
context: context,
scrollbarPainter: verticalScrollbar,
duration: pressDuration,
),
(_ThumbPressGestureRecognizer instance) {
instance.onLongPress = handleThumbPressVertical;
instance.onLongPressStart = (LongPressStartDetails details) =>
handleThumbPressStartVertical(details.globalPosition);
instance.onLongPressMoveUpdate = (LongPressMoveUpdateDetails details) =>
handleThumbPressUpdateVertical(details.globalPosition);
instance.onLongPressEnd = (LongPressEndDetails details) =>
handleThumbPressEndVertical(
details.globalPosition, details.velocity);
},
);
gestures[_TrackTapGestureRecognizer] =
GestureRecognizerFactoryWithHandlers<_TrackTapGestureRecognizer>(
() => _TrackTapGestureRecognizer(
debugOwner: this,
context: context,
scrollbarPainter: verticalScrollbar,
),
(_TrackTapGestureRecognizer instance) {
instance.onTapDown = handleTrackTapDownVertical;
},
);
return gestures;
}