JsonGestureDetectorBuilderModel class
Creates a widget that detects gestures.
Pan and scale callbacks cannot be used simultaneously because scale is a superset of pan. Use the scale callbacks instead.
Horizontal and vertical drag callbacks cannot be used simultaneously because a combination of a horizontal and vertical drag is a pan. Use the pan callbacks instead.
By default, gesture detectors contribute semantic information to the tree that is used by assistive technology.
- Inheritance
-
- Object
- JsonClass
- JsonWidgetBuilderModel
- JsonGestureDetectorBuilderModel
Constructors
-
JsonGestureDetectorBuilderModel.new(Map<
String, dynamic> args, {HitTestBehavior? behavior, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool excludeFromSemantics = false, void onDoubleTap()?, void onDoubleTapCancel()?, void onDoubleTapDown(TapDownDetails)?, void onForcePressEnd(ForcePressDetails)?, void onForcePressPeak(ForcePressDetails)?, void onForcePressStart(ForcePressDetails)?, void onForcePressUpdate(ForcePressDetails)?, void onHorizontalDragCancel()?, void onHorizontalDragDown(DragDownDetails)?, void onHorizontalDragEnd(DragEndDetails)?, void onHorizontalDragStart(DragStartDetails)?, void onHorizontalDragUpdate(DragUpdateDetails)?, void onLongPress()?, void onLongPressCancel()?, void onLongPressDown(LongPressDownDetails)?, void onLongPressEnd(LongPressEndDetails)?, void onLongPressMoveUpdate(LongPressMoveUpdateDetails)?, void onLongPressStart(LongPressStartDetails)?, void onLongPressUp()?, void onPanCancel()?, void onPanDown(DragDownDetails)?, void onPanEnd(DragEndDetails)?, void onPanStart(DragStartDetails)?, void onPanUpdate(DragUpdateDetails)?, void onScaleEnd(ScaleEndDetails)?, void onScaleStart(ScaleStartDetails)?, void onScaleUpdate(ScaleUpdateDetails)?, void onSecondaryLongPress()?, void onSecondaryLongPressCancel()?, void onSecondaryLongPressDown(LongPressDownDetails)?, void onSecondaryLongPressEnd(LongPressEndDetails)?, void onSecondaryLongPressMoveUpdate(LongPressMoveUpdateDetails)?, void onSecondaryLongPressStart(LongPressStartDetails)?, void onSecondaryLongPressUp()?, void onSecondaryTap()?, void onSecondaryTapCancel()?, void onSecondaryTapDown(TapDownDetails)?, void onSecondaryTapUp(TapUpDetails)?, void onTap()?, void onTapCancel()?, void onTapDown(TapDownDetails)?, void onTapUp(TapUpDetails)?, void onTertiaryLongPress()?, void onTertiaryLongPressCancel()?, void onTertiaryLongPressDown(LongPressDownDetails)?, void onTertiaryLongPressEnd(LongPressEndDetails)?, void onTertiaryLongPressMoveUpdate(LongPressMoveUpdateDetails)?, void onTertiaryLongPressStart(LongPressStartDetails)?, void onTertiaryLongPressUp()?, void onTertiaryTapCancel()?, void onTertiaryTapDown(TapDownDetails)?, void onTertiaryTapUp(TapUpDetails)?, void onVerticalDragCancel()?, void onVerticalDragDown(DragDownDetails)?, void onVerticalDragEnd(DragEndDetails)?, void onVerticalDragStart(DragStartDetails)?, void onVerticalDragUpdate(DragUpdateDetails)?, Set<PointerDeviceKind> ? supportedDevices, bool trackpadScrollCausesScale = false, Offset trackpadScrollToScaleFactor = kDefaultTrackpadScrollToScaleFactor, JsonWidgetData? child}) -
const
Properties
-
args
→ Map<
String, dynamic> -
finalinherited
- behavior → HitTestBehavior?
-
How this gesture detector should behave during hit testing when deciding
how the hit test propagates to children and whether to consider targets
behind this one.
final
- child → JsonWidgetData?
-
The widget below this widget in the tree.
final
- dragStartBehavior → DragStartBehavior
-
Determines the way that drag start behavior is handled.
final
- excludeFromSemantics → bool
-
Whether to exclude these gestures from the semantics tree. For
example, the long-press gesture for showing a tooltip is
excluded because the tooltip itself is included in the semantics
tree directly and so having a gesture to show it would result in
duplication of information.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDoubleTap → void Function()?
-
The user has tapped the screen with a primary button at the same location
twice in quick succession.
final
- onDoubleTapCancel → void Function()?
-
The pointer that previously triggered onDoubleTapDown will not end up
causing a double tap.
final
- onDoubleTapDown → void Function(TapDownDetails)?
-
A pointer that might cause a double tap has contacted the screen at a
particular location.
final
- onForcePressEnd → void Function(ForcePressDetails)?
-
The pointer tracked by onForcePressStart is no longer in contact with the screen.
final
- onForcePressPeak → void Function(ForcePressDetails)?
-
The pointer is in contact with the screen and has pressed with the maximum
force. The amount of force is at least
ForcePressGestureRecognizer.peakPressure.
final
- onForcePressStart → void Function(ForcePressDetails)?
-
The pointer is in contact with the screen and has pressed with sufficient
force to initiate a force press. The amount of force is at least
ForcePressGestureRecognizer.startPressure.
final
- onForcePressUpdate → void Function(ForcePressDetails)?
-
A pointer is in contact with the screen, has previously passed the
ForcePressGestureRecognizer.startPressure and is either moving on the
plane of the screen, pressing the screen with varying forces or both
simultaneously.
final
- onHorizontalDragCancel → void Function()?
-
The pointer that previously triggered onHorizontalDragDown did not
complete.
final
- onHorizontalDragDown → void Function(DragDownDetails)?
-
A pointer has contacted the screen with a primary button and might begin
to move horizontally.
final
- onHorizontalDragEnd → void Function(DragEndDetails)?
-
A pointer that was previously in contact with the screen with a primary
button and moving horizontally is no longer in contact with the screen and
was moving at a specific velocity when it stopped contacting the screen.
final
- onHorizontalDragStart → void Function(DragStartDetails)?
-
A pointer has contacted the screen with a primary button and has begun to
move horizontally.
final
- onHorizontalDragUpdate → void Function(DragUpdateDetails)?
-
A pointer that is in contact with the screen with a primary button and
moving horizontally has moved in the horizontal direction.
final
- onLongPress → void Function()?
-
Called when a long press gesture with a primary button has been recognized.
final
- onLongPressCancel → void Function()?
-
A pointer that previously triggered onLongPressDown will not end up
causing a long-press.
final
- onLongPressDown → void Function(LongPressDownDetails)?
-
The pointer has contacted the screen with a primary button, which might
be the start of a long-press.
final
- onLongPressEnd → void Function(LongPressEndDetails)?
-
A pointer that has triggered a long-press with a primary button has
stopped contacting the screen.
final
- onLongPressMoveUpdate → void Function(LongPressMoveUpdateDetails)?
-
A pointer has been drag-moved after a long-press with a primary button.
final
- onLongPressStart → void Function(LongPressStartDetails)?
-
Called when a long press gesture with a primary button has been recognized.
final
- onLongPressUp → void Function()?
-
A pointer that has triggered a long-press with a primary button has
stopped contacting the screen.
final
- onPanCancel → void Function()?
-
The pointer that previously triggered onPanDown did not complete.
final
- onPanDown → void Function(DragDownDetails)?
-
A pointer has contacted the screen with a primary button and might begin
to move.
final
- onPanEnd → void Function(DragEndDetails)?
-
A pointer that was previously in contact with the screen with a primary
button and moving is no longer in contact with the screen and was moving
at a specific velocity when it stopped contacting the screen.
final
- onPanStart → void Function(DragStartDetails)?
-
A pointer has contacted the screen with a primary button and has begun to
move.
final
- onPanUpdate → void Function(DragUpdateDetails)?
-
A pointer that is in contact with the screen with a primary button and
moving has moved again.
final
- onScaleEnd → void Function(ScaleEndDetails)?
-
The pointers are no longer in contact with the screen.
final
- onScaleStart → void Function(ScaleStartDetails)?
-
The pointers in contact with the screen have established a focal point and
initial scale of 1.0.
final
- onScaleUpdate → void Function(ScaleUpdateDetails)?
-
The pointers in contact with the screen have indicated a new focal point
and/or scale.
final
- onSecondaryLongPress → void Function()?
-
Called when a long press gesture with a secondary button has been
recognized.
final
- onSecondaryLongPressCancel → void Function()?
-
A pointer that previously triggered onSecondaryLongPressDown will not
end up causing a long-press.
final
- onSecondaryLongPressDown → void Function(LongPressDownDetails)?
-
The pointer has contacted the screen with a secondary button, which might
be the start of a long-press.
final
- onSecondaryLongPressEnd → void Function(LongPressEndDetails)?
-
A pointer that has triggered a long-press with a secondary button has
stopped contacting the screen.
final
- onSecondaryLongPressMoveUpdate → void Function(LongPressMoveUpdateDetails)?
-
A pointer has been drag-moved after a long press with a secondary button.
final
- onSecondaryLongPressStart → void Function(LongPressStartDetails)?
-
Called when a long press gesture with a secondary button has been
recognized.
final
- onSecondaryLongPressUp → void Function()?
-
A pointer that has triggered a long-press with a secondary button has
stopped contacting the screen.
final
- onSecondaryTap → void Function()?
-
A tap with a secondary button has occurred.
final
- onSecondaryTapCancel → void Function()?
-
The pointer that previously triggered onSecondaryTapDown will not end up
causing a tap.
final
- onSecondaryTapDown → void Function(TapDownDetails)?
-
A pointer that might cause a tap with a secondary button has contacted the
screen at a particular location.
final
- onSecondaryTapUp → void Function(TapUpDetails)?
-
A pointer that will trigger a tap with a secondary button has stopped
contacting the screen at a particular location.
final
- onTap → void Function()?
-
A tap with a primary button has occurred.
final
- onTapCancel → void Function()?
-
The pointer that previously triggered onTapDown will not end up causing
a tap.
final
- onTapDown → void Function(TapDownDetails)?
-
A pointer that might cause a tap with a primary button has contacted the
screen at a particular location.
final
- onTapUp → void Function(TapUpDetails)?
-
A pointer that will trigger a tap with a primary button has stopped
contacting the screen at a particular location.
final
- onTertiaryLongPress → void Function()?
-
Called when a long press gesture with a tertiary button has been
recognized.
final
- onTertiaryLongPressCancel → void Function()?
-
A pointer that previously triggered onTertiaryLongPressDown will not
end up causing a long-press.
final
- onTertiaryLongPressDown → void Function(LongPressDownDetails)?
-
The pointer has contacted the screen with a tertiary button, which might
be the start of a long-press.
final
- onTertiaryLongPressEnd → void Function(LongPressEndDetails)?
-
A pointer that has triggered a long-press with a tertiary button has
stopped contacting the screen.
final
- onTertiaryLongPressMoveUpdate → void Function(LongPressMoveUpdateDetails)?
-
A pointer has been drag-moved after a long press with a tertiary button.
final
- onTertiaryLongPressStart → void Function(LongPressStartDetails)?
-
Called when a long press gesture with a tertiary button has been
recognized.
final
- onTertiaryLongPressUp → void Function()?
-
A pointer that has triggered a long-press with a tertiary button has
stopped contacting the screen.
final
- onTertiaryTapCancel → void Function()?
-
The pointer that previously triggered onTertiaryTapDown will not end up
causing a tap.
final
- onTertiaryTapDown → void Function(TapDownDetails)?
-
A pointer that might cause a tap with a tertiary button has contacted the
screen at a particular location.
final
- onTertiaryTapUp → void Function(TapUpDetails)?
-
A pointer that will trigger a tap with a tertiary button has stopped
contacting the screen at a particular location.
final
- onVerticalDragCancel → void Function()?
-
The pointer that previously triggered onVerticalDragDown did not
complete.
final
- onVerticalDragDown → void Function(DragDownDetails)?
-
A pointer has contacted the screen with a primary button and might begin
to move vertically.
final
- onVerticalDragEnd → void Function(DragEndDetails)?
-
A pointer that was previously in contact with the screen with a primary
button and moving vertically is no longer in contact with the screen and
was moving at a specific velocity when it stopped contacting the screen.
final
- onVerticalDragStart → void Function(DragStartDetails)?
-
A pointer has contacted the screen with a primary button and has begun to
move vertically.
final
- onVerticalDragUpdate → void Function(DragUpdateDetails)?
-
A pointer that is in contact with the screen with a primary button and
moving vertically has moved in the vertical direction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedDevices
→ Set<
PointerDeviceKind> ? -
The kind of devices that are allowed to be recognized.
final
- trackpadScrollCausesScale → bool
-
Whether scrolling up/down on a trackpad should cause scaling instead of
panning.
final
- trackpadScrollToScaleFactor → Offset
-
A factor to control the direction and magnitude of scale when converting
trackpad scrolling.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Abstract function that concrete classes must implement. This must encode
the internal data model to a JSON compatible representation.
override
-
toString(
) → String -
Returns the string encoded JSON representation for this class. This will
remove all null values and empty collections from the returned string.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromDynamic(
dynamic map, {Map< String, dynamic> args = const {}, JsonWidgetRegistry? registry}) → JsonGestureDetectorBuilderModel -
maybeFromDynamic(
dynamic map, {Map< String, dynamic> args = const {}, JsonWidgetRegistry? registry}) → JsonGestureDetectorBuilderModel?