Reference

GestureDetector

GestureDetector

GestureDetector control. Build it with the gesture_detector helper.

Example

gesture_detector(
  content: text("GestureDetector"),
  expand: true,
  width: 240,
  height: 120,
  on_tap: ->(event) {}
)

Properties

  • adaptive — Adapts to the platform (Material/Cupertino) when true.
  • allowed_devices
  • content — The single child control rendered inside this control.
  • drag_interval
  • exclude_from_semantics
  • hover_interval
  • mouse_cursor — Cursor shown when hovering the control.
  • multi_tap_touches
  • trackpad_scroll_causes_scale

Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).

Events

  • on_animation_end — Fired when an animation completes.
  • on_double_tap — Fired on a double tap.
  • on_double_tap_cancel — Fired on double tap cancel.
  • on_double_tap_down — Fired on double tap down.
  • on_enter — Fired when the pointer enters the control.
  • on_exit — Fired when the pointer leaves the control.
  • on_force_press_end — Fired on force press end.
  • on_force_press_peak — Fired on force press peak.
  • on_force_press_start — Fired on force press start.
  • on_force_press_update — Fired on force press update.
  • on_horizontal_drag_cancel — Fired on horizontal drag cancel.
  • on_horizontal_drag_down — Fired on horizontal drag down.
  • on_horizontal_drag_end — Fired on horizontal drag end.
  • on_horizontal_drag_start — Fired on horizontal drag start.
  • on_horizontal_drag_update — Fired on horizontal drag update.
  • on_hover — Fired when the pointer enters/leaves the control.
  • on_long_press — Fired on a long press.
  • on_long_press_cancel — Fired on long press cancel.
  • on_long_press_down — Fired on long press down.
  • on_long_press_end — Fired on long press end.
  • on_long_press_move_update — Fired on long press move update.
  • on_long_press_start — Fired on long press start.
  • on_long_press_up — Fired on long press up.
  • on_multi_long_press — Fired on multi long press.
  • on_multi_tap — Fired on multi tap.
  • on_pan_cancel — Fired on pan cancel.
  • on_pan_down — Fired on pan down.
  • on_pan_end — Fired on pan end.
  • on_pan_start — Fired on pan start.
  • on_pan_update — Fired on pan update.
  • on_right_pan_end — Fired on right pan end.
  • on_right_pan_start — Fired on right pan start.
  • on_right_pan_update — Fired on right pan update.
  • on_scale_end — Fired on scale end.
  • on_scale_start — Fired on scale start.
  • on_scale_update — Fired on scale update.
  • on_scroll — Fired when the scroll position changes.
  • on_secondary_long_press — Fired on secondary long press.
  • on_secondary_long_press_cancel — Fired on secondary long press cancel.
  • on_secondary_long_press_down — Fired on secondary long press down.
  • on_secondary_long_press_end — Fired on secondary long press end.
  • on_secondary_long_press_move_update — Fired on secondary long press move update.
  • on_secondary_long_press_start — Fired on secondary long press start.
  • on_secondary_long_press_up — Fired on secondary long press up.
  • on_secondary_tap — Fired on secondary tap.
  • on_secondary_tap_cancel — Fired on secondary tap cancel.
  • on_secondary_tap_down — Fired on secondary tap down.
  • on_secondary_tap_up — Fired on secondary tap up.
  • on_size_change — Fired when the control's size changes.
  • on_tap — Fired on a tap.
  • on_tap_cancel — Fired when a tap is cancelled.
  • on_tap_down — Fired when a pointer presses down.
  • on_tap_move — Fired on tap move.
  • on_tap_up — Fired on tap up.
  • on_tertiary_long_press — Fired on tertiary long press.
  • on_tertiary_long_press_cancel — Fired on tertiary long press cancel.
  • on_tertiary_long_press_down — Fired on tertiary long press down.
  • on_tertiary_long_press_end — Fired on tertiary long press end.
  • on_tertiary_long_press_move_update — Fired on tertiary long press move update.
  • on_tertiary_long_press_start — Fired on tertiary long press start.
  • on_tertiary_long_press_up — Fired on tertiary long press up.
  • on_tertiary_tap_cancel — Fired on tertiary tap cancel.
  • on_tertiary_tap_down — Fired on tertiary tap down.
  • on_tertiary_tap_up — Fired on tertiary tap up.
  • on_vertical_drag_cancel — Fired on vertical drag cancel.
  • on_vertical_drag_down — Fired on vertical drag down.
  • on_vertical_drag_end — Fired on vertical drag end.
  • on_vertical_drag_start — Fired on vertical drag start.
  • on_vertical_drag_update — Fired on vertical drag update.

Reference

  • Family: shared
  • Widget type: gesturedetector
  • Helper: gesture_detector