gestures

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 12 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gestures turns pointer events into gestures: hit testing, the gesture arena and the recognizers.

Flutter: package:flutter/gestures.dart.

Index

Constants

View Source
const (
	// PressTimeout is how long a pointer must stay down before the press is
	// a tap-down (the pressed state of a button).
	//
	// Flutter: gestures/constants.dart kPressTimeout
	PressTimeout = 100 * time.Millisecond
	// HoverTapTimeout is the time within which a hover tap would happen.
	//
	// Flutter: gestures/constants.dart kHoverTapTimeout
	HoverTapTimeout = 150 * time.Millisecond
	// HoverTapSlop is the distance a hover tap may move.
	//
	// Flutter: gestures/constants.dart kHoverTapSlop
	HoverTapSlop = 20.0
	// LongPressTimeout is how long a pointer must stay down for a long press.
	//
	// Flutter: gestures/constants.dart kLongPressTimeout
	LongPressTimeout = 500 * time.Millisecond
	// DoubleTapTimeout is the longest time between two taps of a double tap.
	//
	// Flutter: gestures/constants.dart kDoubleTapTimeout
	DoubleTapTimeout = 300 * time.Millisecond
	// DoubleTapMinTime is the shortest time between two taps of a double
	// tap.
	//
	// Flutter: gestures/constants.dart kDoubleTapMinTime
	DoubleTapMinTime = 40 * time.Millisecond
	// DoubleTapTouchSlop is the distance between the taps of a double tap
	// that a touch may move.
	//
	// Flutter: gestures/constants.dart kDoubleTapTouchSlop
	DoubleTapTouchSlop = TouchSlop
	// DoubleTapSlop is the distance between the two taps of a double tap.
	//
	// Flutter: gestures/constants.dart kDoubleTapSlop
	DoubleTapSlop = 100.0
	// ZoomControlsTimeout is how long the zoom controls stay visible.
	//
	// Flutter: gestures/constants.dart kZoomControlsTimeout
	ZoomControlsTimeout = 3000 * time.Millisecond
	// TouchSlop is how far a touch may move before it is a pan or drag. The
	// value was derived by experiment.
	//
	// Flutter: gestures/constants.dart kTouchSlop
	TouchSlop = 18.0
	// PagingTouchSlop is how far a touch may move before it pages.
	//
	// Flutter: gestures/constants.dart kPagingTouchSlop
	PagingTouchSlop = TouchSlop * 2.0
	// PanSlop is how far a touch may move before it is a pan.
	//
	// Flutter: gestures/constants.dart kPanSlop
	PanSlop = TouchSlop * 2.0
	// ScaleSlop is how far a touch may move before it is a scale.
	//
	// Flutter: gestures/constants.dart kScaleSlop
	ScaleSlop = TouchSlop
	// WindowTouchSlop is how far a touch may move outside a window before it
	// dismisses it.
	//
	// Flutter: gestures/constants.dart kWindowTouchSlop
	WindowTouchSlop = 16.0
	// MinFlingVelocity is the slowest fling, in logical pixels per second.
	//
	// Flutter: gestures/constants.dart kMinFlingVelocity
	MinFlingVelocity = 50.0
	// MaxFlingVelocity is the fastest fling, in logical pixels per second.
	//
	// Flutter: gestures/constants.dart kMaxFlingVelocity
	MaxFlingVelocity = 8000.0
	// JumpTapTimeout is the time within which a jump tap would happen.
	//
	// Flutter: gestures/constants.dart kJumpTapTimeout
	JumpTapTimeout = 500 * time.Millisecond
	// PrecisePointerHitSlop is the slop of a precise pointer, such as a mouse.
	//
	// Flutter: gestures/constants.dart kPrecisePointerHitSlop
	PrecisePointerHitSlop = 1.0
	// PrecisePointerPanSlop is the pan slop of a precise pointer.
	//
	// Flutter: gestures/constants.dart kPrecisePointerPanSlop
	PrecisePointerPanSlop = PrecisePointerHitSlop * 2.0
	// PrecisePointerScaleSlop is the scale slop of a precise pointer.
	//
	// Flutter: gestures/constants.dart kPrecisePointerScaleSlop
	PrecisePointerScaleSlop = PrecisePointerHitSlop
)

The thresholds of the gestures, modeled after Android's ViewConfiguration. Distances are in logical pixels.

View Source
const (
	// PrimaryButton is the bit of the primary button: the left mouse button,
	// the stylus tip or a touch contact.
	//
	// Flutter: gestures/events.dart kPrimaryButton
	PrimaryButton = 0x01
	// SecondaryButton is the bit of the secondary button: the right mouse
	// button or the stylus barrel button.
	//
	// Flutter: gestures/events.dart kSecondaryButton
	SecondaryButton = 0x02
	// TertiaryButton is the bit of the tertiary button: the middle mouse
	// button.
	//
	// Flutter: gestures/events.dart kTertiaryButton
	TertiaryButton = 0x04
	// PrimaryMouseButton is PrimaryButton.
	//
	// Flutter: gestures/events.dart kPrimaryMouseButton
	PrimaryMouseButton = PrimaryButton
	// SecondaryMouseButton is SecondaryButton.
	//
	// Flutter: gestures/events.dart kSecondaryMouseButton
	SecondaryMouseButton = SecondaryButton
	// PrimaryStylusButton is the bit of the stylus tip when it presses on the
	// screen.
	//
	// Flutter: gestures/events.dart kPrimaryStylusButton
	PrimaryStylusButton = SecondaryButton
	// StylusContact is PrimaryButton.
	//
	// Flutter: gestures/events.dart kStylusContact
	StylusContact = PrimaryButton
	// MiddleMouseButton is TertiaryButton.
	//
	// Flutter: gestures/events.dart kMiddleMouseButton
	MiddleMouseButton = TertiaryButton
	// SecondaryStylusButton is TertiaryButton.
	//
	// Flutter: gestures/events.dart kSecondaryStylusButton
	SecondaryStylusButton = TertiaryButton
	// BackMouseButton is the bit of the back button of a mouse.
	//
	// Flutter: gestures/events.dart kBackMouseButton
	BackMouseButton = 0x08
	// ForwardMouseButton is the bit of the forward button of a mouse.
	//
	// Flutter: gestures/events.dart kForwardMouseButton
	ForwardMouseButton = 0x10
	// TouchContact is PrimaryButton.
	//
	// Flutter: gestures/events.dart kTouchContact
	TouchContact = PrimaryButton
)

The bit masks of PointerEvent.Buttons.

Flutter: gestures/events.dart kPrimaryButton and the constants after it

View Source
const DefaultMouseScrollToScaleFactor = 200.0

DefaultMouseScrollToScaleFactor is how many pixels of mouse scroll make a scale by a factor of e, when the scroll causes a scale.

Flutter: gestures/scale.dart kDefaultMouseScrollToScaleFactor

Variables

View Source
var DefaultTrackpadScrollToScaleFactor = ui.Offset{Dx: 0, Dy: -1 / DefaultMouseScrollToScaleFactor}

DefaultTrackpadScrollToScaleFactor is how the trackpad scroll turns into a scale, when the scroll causes a scale.

Flutter: gestures/scale.dart kDefaultTrackpadScrollToScaleFactor

View Source
var OffsetPairZero = OffsetPair{}

OffsetPairZero is the pair of zero offsets.

Flutter: gestures/recognizer.dart OffsetPair.zero

View Source
var SlopToleranceNone = SlopTolerance{/* contains filtered or unexported fields */}

SlopToleranceNone is no limit: Flutter's null.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.preAcceptSlopTolerance

View Source
var VelocityZero = Velocity{}

VelocityZero is the zero velocity.

Flutter: gestures/velocity_tracker.dart Velocity.zero

Functions

func ComputeHitSlop

func ComputeHitSlop(kind ui.PointerDeviceKind, settings foundation.Opt[DeviceGestureSettings]) float64

ComputeHitSlop is how far a pointer of the kind may move and still hit: a mouse is precise, and the others use the device's touch slop, or TouchSlop if it gives none.

Flutter: gestures/events.dart computeHitSlop

func ComputePanSlop

func ComputePanSlop(kind ui.PointerDeviceKind, settings foundation.Opt[DeviceGestureSettings]) float64

ComputePanSlop is how far a pointer of the kind may move before it pans: a mouse is precise, and the others use the device's pan slop, or PanSlop if it gives none.

Flutter: gestures/events.dart computePanSlop

func ComputeScaleSlop

func ComputeScaleSlop(kind ui.PointerDeviceKind) float64

ComputeScaleSlop is how far a pointer of the kind may move before it scales.

Flutter: gestures/events.dart computeScaleSlop

func InitHorizontalDragGestureRecognizer

func InitHorizontalDragGestureRecognizer(r *HorizontalDragGestureRecognizer, self OneSequenceHooks, binding *GestureBinding, opts ...DragGestureRecognizerOpts)

InitHorizontalDragGestureRecognizer is InitVerticalDragGestureRecognizer for a type that embeds a HorizontalDragGestureRecognizer.

Flutter: no counterpart (Go embedding)

func InitVerticalDragGestureRecognizer

func InitVerticalDragGestureRecognizer(r *VerticalDragGestureRecognizer, self OneSequenceHooks, binding *GestureBinding, opts ...DragGestureRecognizerOpts)

InitVerticalDragGestureRecognizer sets up a recognizer that embeds a VerticalDragGestureRecognizer: self is the outer value, which the recognizer calls for the methods it overrides (IsPointerAllowed and the like). It is how a type of your own extends the recognizer, where Dart subclasses it.

Flutter: no counterpart (Go embedding)

func InvokeCallbackResult

func InvokeCallbackResult[T any](r *GestureRecognizerBase, name string, callback func() T, debugReport ...func() string) T

InvokeCallbackResult is InvokeCallback for a callback that returns a value.

Flutter: gestures/recognizer.dart GestureRecognizer.invokeCallback

func IsSingleButton

func IsSingleButton(buttons int) bool

IsSingleButton reports whether exactly one button is set in buttons.

Flutter: gestures/events.dart isSingleButton

func NthMouseButton

func NthMouseButton(number int) int

NthMouseButton returns the bit of the mouse button with the number (1 is the primary button).

Flutter: gestures/events.dart nthMouseButton

func NthStylusButton

func NthStylusButton(number int) int

NthStylusButton returns the bit of the stylus button with the number (1 is PrimaryStylusButton).

Flutter: gestures/events.dart nthStylusButton

func RemovePerspectiveTransform

func RemovePerspectiveTransform(transform *ui.Matrix4) *ui.Matrix4

RemovePerspectiveTransform returns a copy of transform that keeps a point under the pointing device: its third row and third column are those of the identity. A paint transform must go through it before it is used for hit testing.

Flutter: gestures/events.dart PointerEvent.removePerspectiveTransform

func SmallestButton

func SmallestButton(buttons int) int

SmallestButton returns the lowest set bit of buttons: the smallest button.

Flutter: gestures/events.dart smallestButton

func ToStringFull

func ToStringFull(e PointerEvent) string

ToStringFull describes the event with all its properties, down to the fine level.

Flutter: gestures/events.dart _PointerEventDescription.toStringFull

func TransformDeltaViaPositions

func TransformDeltaViaPositions(untransformedEndPosition, untransformedDelta ui.Offset, transform *ui.Matrix4, opts ...TransformDeltaViaPositionsOpts) ui.Offset

TransformDeltaViaPositions transforms a delta that ends at untransformedEndPosition. It transforms the start and the end of the delta and subtracts them, which is more precise than transforming the delta.

Flutter: gestures/events.dart PointerEvent.transformDeltaViaPositions

func TransformPosition

func TransformPosition(transform *ui.Matrix4, position ui.Offset) ui.Offset

TransformPosition returns position transformed by transform; a nil transform leaves it as it is.

Flutter: gestures/events.dart PointerEvent.transformPosition

Types

type AllowedButtonsFilter

type AllowedButtonsFilter func(buttons int) bool

AllowedButtonsFilter says whether a gesture may start with the buttons pressed.

Flutter: gestures/recognizer.dart AllowedButtonsFilter

type BaseTapAndDragGestureRecognizer

type BaseTapAndDragGestureRecognizer struct {
	OneSequenceGestureRecognizer

	// DragStartBehavior is where the drag starts; the default is
	// DragStartBehaviorStart.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.dragStartBehavior
	DragStartBehavior DragStartBehavior
	// DragUpdateThrottleFrequency, if set, limits the drag updates to one in
	// that time.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.dragUpdateThrottleFrequency
	DragUpdateThrottleFrequency foundation.Opt[time.Duration]
	// MaxConsecutiveTap is the number of taps after which the series starts
	// over.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.maxConsecutiveTap
	MaxConsecutiveTap foundation.Opt[int]
	// EagerVictoryOnDrag makes the recognizer win the arena when a drag starts.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.eagerVictoryOnDrag
	EagerVictoryOnDrag bool
	// OnTapDown is called when a pointer that might tap or drag touches the
	// screen.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.onTapDown
	OnTapDown GestureTapDragDownCallback
	// OnTapUp is called when a tap ends.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.onTapUp
	OnTapUp GestureTapDragUpCallback
	// OnDragStart is called when a drag starts.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.onDragStart
	OnDragStart GestureTapDragStartCallback
	// OnDragUpdate is called when the pointer moves during the drag.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.onDragUpdate
	OnDragUpdate GestureTapDragUpdateCallback
	// OnDragEnd is called when the drag ends.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.onDragEnd
	OnDragEnd GestureTapDragEndCallback
	// OnCancel is called when the pointer that sent OnTapDown will not tap or
	// drag.
	//
	// Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.onCancel
	OnCancel GestureCancelCallback
	// OnTapTrackStart, if set, is called when a tap starts to be tracked.
	//
	// Flutter: gestures/tap_and_drag.dart _TapStatusTrackerMixin.onTapTrackStart
	OnTapTrackStart func()
	// OnTapTrackReset, if set, is called when the tap tracking is reset.
	//
	// Flutter: gestures/tap_and_drag.dart _TapStatusTrackerMixin.onTapTrackReset
	OnTapTrackReset func()
	// contains filtered or unexported fields
}

BaseTapAndDragGestureRecognizer recognizes a tap, or a drag that starts with a tap, and counts the consecutive taps. Use TapAndPanGestureRecognizer or TapAndHorizontalDragGestureRecognizer.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer

func (*BaseTapAndDragGestureRecognizer) AcceptGesture

func (r *BaseTapAndDragGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture reports the tap down and the start of a drag that was waiting for the win.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.acceptGesture

func (*BaseTapAndDragGestureRecognizer) AddAllowedPointer

func (r *BaseTapAndDragGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the pointer as a tap of the series, and starts the deadline.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.addAllowedPointer

func (*BaseTapAndDragGestureRecognizer) ConsecutiveTapCount

func (r *BaseTapAndDragGestureRecognizer) ConsecutiveTapCount() int

ConsecutiveTapCount is the number of taps of the series so far.

Flutter: gestures/tap_and_drag.dart _TapStatusTrackerMixin.consecutiveTapCount

func (*BaseTapAndDragGestureRecognizer) CurrentDown

CurrentDown is the down event of the tap being tracked.

Flutter: gestures/tap_and_drag.dart _TapStatusTrackerMixin.currentDown

func (*BaseTapAndDragGestureRecognizer) CurrentUp

CurrentUp is the up event of the tap being tracked.

Flutter: gestures/tap_and_drag.dart _TapStatusTrackerMixin.currentUp

func (*BaseTapAndDragGestureRecognizer) DebugDescription

func (r *BaseTapAndDragGestureRecognizer) DebugDescription() string

DebugDescription names the recognizer.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.debugDescription

func (*BaseTapAndDragGestureRecognizer) DidStopTrackingLastPointer

func (r *BaseTapAndDragGestureRecognizer) DidStopTrackingLastPointer(pointer int)

DidStopTrackingLastPointer ends the tap or drag.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.didStopTrackingLastPointer

func (*BaseTapAndDragGestureRecognizer) Dispose

func (r *BaseTapAndDragGestureRecognizer) Dispose()

Dispose stops the timers.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.dispose

func (*BaseTapAndDragGestureRecognizer) HandleEvent

func (r *BaseTapAndDragGestureRecognizer) HandleEvent(event PointerEvent)

HandleEvent follows the primary pointer.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.handleEvent

func (*BaseTapAndDragGestureRecognizer) HandleNonAllowedPointer

func (r *BaseTapAndDragGestureRecognizer) HandleNonAllowedPointer(event *PointerDownEvent)

HandleNonAllowedPointer rejects the recognizer for a pointer that does not use the primary button, unless it already won.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.handleNonAllowedPointer

func (*BaseTapAndDragGestureRecognizer) IsPointerAllowed

func (r *BaseTapAndDragGestureRecognizer) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed allows a primary-button pointer when a callback is set; once a pointer is primary, no other is allowed.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.isPointerAllowed

func (*BaseTapAndDragGestureRecognizer) RejectGesture

func (r *BaseTapAndDragGestureRecognizer) RejectGesture(pointer int)

RejectGesture gives up the pointer and resets the state.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.rejectGesture

type BaseTapGestureRecognizer

type BaseTapGestureRecognizer struct {
	PrimaryPointerGestureRecognizer
	// contains filtered or unexported fields
}

BaseTapGestureRecognizer is the base of the recognizers that recognize taps: a pointer that goes down, and up again without moving much.

Flutter: gestures/tap.dart BaseTapGestureRecognizer

func (*BaseTapGestureRecognizer) AcceptGesture

func (r *BaseTapGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture sends the tap down and, if the pointer is up, the tap up.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.acceptGesture

func (*BaseTapGestureRecognizer) AddAllowedPointer

func (r *BaseTapGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer remembers the down event of a new tap.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.addAllowedPointer

func (*BaseTapGestureRecognizer) DebugDescription

func (r *BaseTapGestureRecognizer) DebugDescription() string

DebugDescription is "base tap".

Flutter: gestures/tap.dart BaseTapGestureRecognizer.debugDescription

func (*BaseTapGestureRecognizer) DebugFillProperties

DebugFillProperties adds the state of the tap.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.debugFillProperties

func (*BaseTapGestureRecognizer) DidExceedDeadline

func (r *BaseTapGestureRecognizer) DidExceedDeadline()

DidExceedDeadline sends the tap down.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.didExceedDeadline

func (*BaseTapGestureRecognizer) HandlePrimaryPointer

func (r *BaseTapGestureRecognizer) HandlePrimaryPointer(event PointerEvent)

HandlePrimaryPointer checks for the end of the tap.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.handlePrimaryPointer

func (*BaseTapGestureRecognizer) HandleTapMove

func (r *BaseTapGestureRecognizer) HandleTapMove(*PointerMoveEvent)

HandleTapMove does nothing.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.handleTapMove

func (*BaseTapGestureRecognizer) InitBaseTap

func (r *BaseTapGestureRecognizer) InitBaseTap(binding *GestureBinding, self BaseTapHooks, opts BaseTapOpts)

InitBaseTap sets up the recognizer; self is the recognizer that embeds it.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.new

func (*BaseTapGestureRecognizer) RejectGesture

func (r *BaseTapGestureRecognizer) RejectGesture(pointer int)

RejectGesture cancels the tap if it sent a tap down.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.rejectGesture

func (*BaseTapGestureRecognizer) Resolve

func (r *BaseTapGestureRecognizer) Resolve(disposition GestureDisposition)

Resolve cancels the tap if the recognizer won and is now rejected, then resolves.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.resolve

func (*BaseTapGestureRecognizer) StartTrackingPointer

func (r *BaseTapGestureRecognizer) StartTrackingPointer(pointer int, transform *ui.Matrix4)

StartTrackingPointer tracks the pointer; the recognizer must have a down event.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.startTrackingPointer

type BaseTapHooks

type BaseTapHooks interface {
	PrimaryPointerHooks
	// HandleTapDown is called when the pointer has been down for PressTimeout
	// or the recognizer wins the arena.
	//
	// Flutter: gestures/tap.dart BaseTapGestureRecognizer.handleTapDown
	HandleTapDown(down *PointerDownEvent)
	// HandleTapUp is called when the tap is recognized: the pointer is up and
	// the recognizer won.
	//
	// Flutter: gestures/tap.dart BaseTapGestureRecognizer.handleTapUp
	HandleTapUp(down *PointerDownEvent, up *PointerUpEvent)
	// HandleTapMove is called when the pointer moves. The default does
	// nothing.
	//
	// Flutter: gestures/tap.dart BaseTapGestureRecognizer.handleTapMove
	HandleTapMove(move *PointerMoveEvent)
	// HandleTapCancel is called when the tap is cancelled after HandleTapDown.
	// The cancel event is nil if the cancellation was not a cancel event; the
	// reason says why.
	//
	// Flutter: gestures/tap.dart BaseTapGestureRecognizer.handleTapCancel
	HandleTapCancel(down *PointerDownEvent, cancel *PointerCancelEvent, reason string)
}

BaseTapHooks are the methods of a BaseTapGestureRecognizer that the subclass supplies.

Flutter: gestures/tap.dart BaseTapGestureRecognizer

type BaseTapOpts

type BaseTapOpts struct {
	GestureRecognizerOpts
	// PreAcceptSlopTolerance is how far the pointer may move before the
	// recognizer wins the arena without it giving up.
	PreAcceptSlopTolerance SlopTolerance
	// PostAcceptSlopTolerance is how far the pointer may move after the
	// recognizer won.
	PostAcceptSlopTolerance SlopTolerance
}

BaseTapOpts are the parameters of InitBaseTap.

Flutter: gestures/tap.dart BaseTapGestureRecognizer.new

type DebugOptions

type DebugOptions struct {
	// PrintHitTestResults prints the result of every hit test.
	//
	// Flutter: gestures/debug.dart debugPrintHitTestResults
	PrintHitTestResults bool
	// PrintMouseHoverEvents prints every hover event.
	//
	// Flutter: gestures/debug.dart debugPrintMouseHoverEvents
	PrintMouseHoverEvents bool
	// PrintGestureArenaDiagnostics prints what happens in the gesture arenas.
	//
	// Flutter: gestures/debug.dart debugPrintGestureArenaDiagnostics
	PrintGestureArenaDiagnostics bool
	// PrintRecognizerCallbacksTrace prints a stack trace for every
	// callback of a recognizer.
	//
	// Flutter: gestures/debug.dart debugPrintRecognizerCallbacksTrace
	PrintRecognizerCallbacksTrace bool
	// PrintResamplingMargin prints how long before the sample time the last
	// event came.
	//
	// Flutter: gestures/debug.dart debugPrintResamplingMargin
	PrintResamplingMargin bool
	// Print receives the lines; the default drops them.
	//
	// Flutter: foundation/print.dart debugPrint
	Print func(line string)
}

DebugOptions are the diagnostics flags of the gestures library. A binding and a GestureArenaManager hold one; there are no global flags.

Deviation: Flutter's flags are global variables (SPEC §12.10).

Flutter: gestures/debug.dart debugPrintHitTestResults and the flags beside it

type DelayedMultiDragGestureRecognizer

type DelayedMultiDragGestureRecognizer struct {
	MultiDragGestureRecognizer
	// contains filtered or unexported fields
}

DelayedMultiDragGestureRecognizer starts a drag after a pointer has stayed down for a delay without moving past the slop.

Flutter: gestures/multidrag.dart DelayedMultiDragGestureRecognizer

func NewDelayedMultiDragGestureRecognizer

func NewDelayedMultiDragGestureRecognizer(binding *GestureBinding, opts ...DelayedMultiDragGestureRecognizerOpts) *DelayedMultiDragGestureRecognizer

NewDelayedMultiDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multidrag.dart DelayedMultiDragGestureRecognizer.new

func (*DelayedMultiDragGestureRecognizer) CreateNewPointerState

CreateNewPointerState makes the state of the pointer, with its timer.

Flutter: gestures/multidrag.dart DelayedMultiDragGestureRecognizer.createNewPointerState

func (*DelayedMultiDragGestureRecognizer) DebugDescription

func (r *DelayedMultiDragGestureRecognizer) DebugDescription() string

DebugDescription is "long multidrag".

Flutter: gestures/multidrag.dart DelayedMultiDragGestureRecognizer.debugDescription

func (*DelayedMultiDragGestureRecognizer) Delay

Delay is how long a pointer must stay down before a drag.

Flutter: gestures/multidrag.dart DelayedMultiDragGestureRecognizer.delay

type DelayedMultiDragGestureRecognizerOpts

type DelayedMultiDragGestureRecognizerOpts struct {
	MultiDragGestureRecognizerOpts
	// Delay is how long a pointer must stay down before a drag; the default is
	// LongPressTimeout.
	Delay foundation.Opt[time.Duration]
}

DelayedMultiDragGestureRecognizerOpts are the optional parameters of NewDelayedMultiDragGestureRecognizer.

Flutter: gestures/multidrag.dart DelayedMultiDragGestureRecognizer.new

type DeviceGestureSettings

type DeviceGestureSettings struct {
	// TouchSlop is how far a touch may move before it is a drag; None if the
	// device gives none.
	//
	// Flutter: gestures/gesture_settings.dart DeviceGestureSettings.touchSlop
	TouchSlop foundation.Opt[float64]
}

DeviceGestureSettings are the gesture thresholds of the device, in logical pixels. A recognizer reads them in place of its default constants.

Flutter: gestures/gesture_settings.dart DeviceGestureSettings

func NewDeviceGestureSettings

func NewDeviceGestureSettings(touchSlop foundation.Opt[float64]) DeviceGestureSettings

NewDeviceGestureSettings creates the settings with the touch slop.

Flutter: gestures/gesture_settings.dart DeviceGestureSettings.new

func NewDeviceGestureSettingsFromView

func NewDeviceGestureSettingsFromView(view *ui.View) DeviceGestureSettings

NewDeviceGestureSettingsFromView creates the settings from the platform's settings of the view, which are in physical pixels.

Flutter: gestures/gesture_settings.dart DeviceGestureSettings.fromView

func (DeviceGestureSettings) PanSlop

PanSlop is twice the touch slop; None if there is no touch slop.

Flutter: gestures/gesture_settings.dart DeviceGestureSettings.panSlop

func (DeviceGestureSettings) String

func (s DeviceGestureSettings) String() string

String describes the settings.

Flutter: gestures/gesture_settings.dart DeviceGestureSettings.toString

type DevicePixelRatioGetter

type DevicePixelRatioGetter func(viewID ui.ViewID) foundation.Opt[float64]

DevicePixelRatioGetter returns the device pixel ratio of the view, or None if the view does not exist (any more).

Flutter: gestures/converter.dart DevicePixelRatioGetter

type DoubleTapGestureRecognizer

type DoubleTapGestureRecognizer struct {
	GestureRecognizerBase

	// OnDoubleTapDown is called when the second pointer touches the screen.
	//
	// Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.onDoubleTapDown
	OnDoubleTapDown GestureTapDownCallback
	// OnDoubleTap is called when the double tap happens.
	//
	// Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.onDoubleTap
	OnDoubleTap GestureDoubleTapCallback
	// OnDoubleTapCancel is called when a pointer that sent OnDoubleTapDown will
	// not complete a double tap.
	//
	// Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.onDoubleTapCancel
	OnDoubleTapCancel GestureTapCancelCallback
	// contains filtered or unexported fields
}

DoubleTapGestureRecognizer recognizes two taps in quick succession, near each other, with the same button.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer

func NewDoubleTapGestureRecognizer

func NewDoubleTapGestureRecognizer(binding *GestureBinding, opts ...DoubleTapGestureRecognizerOpts) *DoubleTapGestureRecognizer

NewDoubleTapGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.new

func (*DoubleTapGestureRecognizer) AcceptGesture

func (r *DoubleTapGestureRecognizer) AcceptGesture(int)

AcceptGesture does nothing.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.acceptGesture

func (*DoubleTapGestureRecognizer) AddAllowedPointer

func (r *DoubleTapGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the tap, or starts over if it is too early or has another button.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.addAllowedPointer

func (*DoubleTapGestureRecognizer) DebugDescription

func (r *DoubleTapGestureRecognizer) DebugDescription() string

DebugDescription is "double tap".

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.debugDescription

func (*DoubleTapGestureRecognizer) Dispose

func (r *DoubleTapGestureRecognizer) Dispose()

Dispose resets the recognizer.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.dispose

func (*DoubleTapGestureRecognizer) IsPointerAllowed

func (r *DoubleTapGestureRecognizer) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed allows a pointer if a callback is set; a pointer that is not allowed resets the recognizer.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.isPointerAllowed

func (*DoubleTapGestureRecognizer) RejectGesture

func (r *DoubleTapGestureRecognizer) RejectGesture(pointer int)

RejectGesture rejects the tracker of the pointer.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.rejectGesture

type DoubleTapGestureRecognizerOpts

type DoubleTapGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed;
	// the default allows the primary button only.
	AllowedButtonsFilter AllowedButtonsFilter
}

DoubleTapGestureRecognizerOpts are the optional parameters of NewDoubleTapGestureRecognizer.

Flutter: gestures/multitap.dart DoubleTapGestureRecognizer.new

type Drag

type Drag interface {
	// Update is called when the pointer moves.
	//
	// Flutter: gestures/drag.dart Drag.update
	Update(details DragUpdateDetails)
	// End is called when the pointer is lifted.
	//
	// Flutter: gestures/drag.dart Drag.end
	End(details DragEndDetails)
	// Cancel is called when the drag is cancelled.
	//
	// Flutter: gestures/drag.dart Drag.cancel
	Cancel()
}

Drag represents a drag that a MultiDragGestureRecognizer reports to the app. It is the object that GestureMultiDragStartCallback returns.

Flutter: gestures/drag.dart Drag

type DragDownDetails

type DragDownDetails struct {
	// GlobalPosition is the global position of the pointer when it touched the
	// screen.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
}

DragDownDetails is the data of the pointer that touched the screen, which might start a drag.

Flutter: gestures/drag_details.dart DragDownDetails

func NewDragDownDetails

func NewDragDownDetails(opts ...DragDownOpts) DragDownDetails

NewDragDownDetails creates the details.

Flutter: gestures/drag_details.dart DragDownDetails.new

func (DragDownDetails) DebugFillProperties

func (d DragDownDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/drag_details.dart DragDownDetails.debugFillProperties

func (DragDownDetails) GetGlobalPosition

func (d DragDownDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/drag_details.dart DragDownDetails.globalPosition

func (DragDownDetails) GetLocalPosition

func (d DragDownDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/drag_details.dart DragDownDetails.localPosition

func (DragDownDetails) String

func (d DragDownDetails) String() string

String describes the details.

Flutter: gestures/drag_details.dart DragDownDetails.toString

type DragDownOpts

type DragDownOpts struct {
	// GlobalPosition is where the pointer touched the screen, in global
	// coordinates.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
}

DragDownOpts are the optional parameters of NewDragDownDetails.

Flutter: gestures/drag_details.dart DragDownDetails.new

type DragEndDetails

type DragEndDetails struct {
	// GlobalPosition is the global position where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Velocity is the velocity the pointer had when it was lifted.
	Velocity Velocity
	// PrimaryVelocity is the velocity along the primary axis; None for a drag
	// that has no primary axis.
	PrimaryVelocity foundation.Opt[float64]
}

DragEndDetails is the data of a drag that ended.

Flutter: gestures/drag_details.dart DragEndDetails

func NewDragEndDetails

func NewDragEndDetails(opts ...DragEndOpts) DragEndDetails

NewDragEndDetails creates the details.

Flutter: gestures/drag_details.dart DragEndDetails.new

func (DragEndDetails) DebugFillProperties

func (d DragEndDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/drag_details.dart DragEndDetails.debugFillProperties

func (DragEndDetails) GetGlobalPosition

func (d DragEndDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/drag_details.dart DragEndDetails.globalPosition

func (DragEndDetails) GetLocalPosition

func (d DragEndDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/drag_details.dart DragEndDetails.localPosition

func (DragEndDetails) String

func (d DragEndDetails) String() string

String describes the details.

Flutter: gestures/drag_details.dart DragEndDetails.toString

type DragEndOpts

type DragEndOpts struct {
	// GlobalPosition is where the pointer was lifted, in global coordinates.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// Velocity is the velocity of the pointer when it was lifted.
	Velocity Velocity
	// PrimaryVelocity is the velocity along the primary axis of the drag. If
	// given, the velocity must be along that axis only, or a debug build
	// panics with the tag DragEndPrimaryVelocityInvalid.
	PrimaryVelocity foundation.Opt[float64]
}

DragEndOpts are the optional parameters of NewDragEndDetails.

Flutter: gestures/drag_details.dart DragEndDetails.new

type DragGestureRecognizer

type DragGestureRecognizer struct {
	OneSequenceGestureRecognizer

	// DragStartBehavior is where the drag starts.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.dragStartBehavior
	DragStartBehavior DragStartBehavior
	// MultitouchDragStrategy is how the drag follows several fingers.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.multitouchDragStrategy
	MultitouchDragStrategy MultitouchDragStrategy
	// OnDown is called when a pointer that might drag touches the screen.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.onDown
	OnDown GestureDragDownCallback
	// OnStart is called when the drag starts.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.onStart
	OnStart GestureDragStartCallback
	// OnUpdate is called when the pointer moves during the drag.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.onUpdate
	OnUpdate GestureDragUpdateCallback
	// OnEnd is called when the pointer that dragged is lifted.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.onEnd
	OnEnd GestureDragEndCallback
	// OnCancel is called when the pointer that sent OnDown will not drag.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.onCancel
	OnCancel GestureDragCancelCallback
	// MinFlingDistance is the shortest distance of a fling; the default is the
	// hit slop of the device.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.minFlingDistance
	MinFlingDistance foundation.Opt[float64]
	// MinFlingVelocity is the slowest fling; the default is MinFlingVelocity.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.minFlingVelocity
	MinFlingVelocity foundation.Opt[float64]
	// MaxFlingVelocity is the fastest fling; the default is MaxFlingVelocity.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.maxFlingVelocity
	MaxFlingVelocity foundation.Opt[float64]
	// OnlyAcceptDragOnThreshold makes the recognizer report a drag only after
	// the pointer has moved past the slop.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.onlyAcceptDragOnThreshold
	OnlyAcceptDragOnThreshold bool
	// VelocityTrackerBuilder makes the velocity tracker of a pointer.
	//
	// Flutter: gestures/monodrag.dart DragGestureRecognizer.velocityTrackerBuilder
	VelocityTrackerBuilder GestureVelocityTrackerBuilder
	// contains filtered or unexported fields
}

DragGestureRecognizer is the base of the recognizers of drags: it recognizes the pointer moving past the slop with its button down. Use VerticalDragGestureRecognizer, HorizontalDragGestureRecognizer or PanGestureRecognizer.

Flutter: gestures/monodrag.dart DragGestureRecognizer

func (*DragGestureRecognizer) AcceptGesture

func (r *DragGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture starts the drag.

Flutter: gestures/monodrag.dart DragGestureRecognizer.acceptGesture

func (*DragGestureRecognizer) AddAllowedPointer

func (r *DragGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the pointer.

Flutter: gestures/monodrag.dart DragGestureRecognizer.addAllowedPointer

func (*DragGestureRecognizer) AddAllowedPointerPanZoom

func (r *DragGestureRecognizer) AddAllowedPointerPanZoom(event *PointerPanZoomStartEvent)

AddAllowedPointerPanZoom tracks the trackpad gesture as a pointer with the primary button.

Flutter: gestures/monodrag.dart DragGestureRecognizer.addAllowedPointerPanZoom

func (*DragGestureRecognizer) ConsiderFling

ConsiderFling returns the details of a fling, or None if the estimate is not one.

Flutter: gestures/monodrag.dart DragGestureRecognizer.considerFling

func (*DragGestureRecognizer) DebugDescription

func (r *DragGestureRecognizer) DebugDescription() string

DebugDescription names the recognizer by its axis.

Flutter: gestures/monodrag.dart DragGestureRecognizer.debugDescription

func (*DragGestureRecognizer) DebugFillProperties

DebugFillProperties adds the start behavior.

Flutter: gestures/monodrag.dart DragGestureRecognizer.debugFillProperties

func (*DragGestureRecognizer) DebugLastPendingEventTimestamp

func (r *DragGestureRecognizer) DebugLastPendingEventTimestamp() foundation.Opt[time.Duration]

DebugLastPendingEventTimestamp is the time of the last event before the drag was accepted. It is meant for tests.

Flutter: gestures/monodrag.dart DragGestureRecognizer.debugLastPendingEventTimestamp

func (*DragGestureRecognizer) DidStopTrackingLastPointer

func (r *DragGestureRecognizer) DidStopTrackingLastPointer(pointer int)

DidStopTrackingLastPointer ends or cancels the drag.

Flutter: gestures/monodrag.dart DragGestureRecognizer.didStopTrackingLastPointer

func (*DragGestureRecognizer) Dispose

func (r *DragGestureRecognizer) Dispose()

Dispose releases the velocity trackers.

Flutter: gestures/monodrag.dart DragGestureRecognizer.dispose

func (*DragGestureRecognizer) GlobalDistanceMoved

func (r *DragGestureRecognizer) GlobalDistanceMoved() float64

GlobalDistanceMoved is how far the pointer moved along the axis of the drag, in global coordinates, with the sign of the movement.

Flutter: gestures/monodrag.dart DragGestureRecognizer.globalDistanceMoved

func (*DragGestureRecognizer) HandleEvent

func (r *DragGestureRecognizer) HandleEvent(event PointerEvent)

HandleEvent follows the pointer.

Flutter: gestures/monodrag.dart DragGestureRecognizer.handleEvent

func (*DragGestureRecognizer) IsFlingGesture

func (r *DragGestureRecognizer) IsFlingGesture(estimate VelocityEstimate, kind ui.PointerDeviceKind) bool

IsFlingGesture reports whether the velocity estimate is a fling.

Flutter: gestures/monodrag.dart DragGestureRecognizer.isFlingGesture

func (*DragGestureRecognizer) IsPointerAllowed

func (r *DragGestureRecognizer) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed allows a pointer if a callback is set and, once a drag is possible, its buttons are those that started it.

Flutter: gestures/monodrag.dart DragGestureRecognizer.isPointerAllowed

func (*DragGestureRecognizer) LastPosition

func (r *DragGestureRecognizer) LastPosition() OffsetPair

LastPosition is the position of the pointer at its last move.

Flutter: gestures/monodrag.dart DragGestureRecognizer.lastPosition

func (*DragGestureRecognizer) RejectGesture

func (r *DragGestureRecognizer) RejectGesture(pointer int)

RejectGesture gives up the pointer.

Flutter: gestures/monodrag.dart DragGestureRecognizer.rejectGesture

type DragGestureRecognizerOpts

type DragGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed;
	// the default allows the primary button only.
	AllowedButtonsFilter AllowedButtonsFilter
	// DragStartBehavior is where the drag starts; the default is
	// DragStartBehaviorStart.
	DragStartBehavior DragStartBehavior
	// MultitouchDragStrategy is how the drag follows several fingers; the
	// default is MultitouchDragStrategyLatestPointer.
	MultitouchDragStrategy MultitouchDragStrategy
	// VelocityTrackerBuilder makes the velocity tracker of a pointer; the
	// default is NewVelocityTrackerWithKind of the binding's clock.
	VelocityTrackerBuilder GestureVelocityTrackerBuilder
	// OnlyAcceptDragOnThreshold makes the recognizer report a drag only after
	// the pointer has moved past the slop.
	OnlyAcceptDragOnThreshold bool
}

DragGestureRecognizerOpts are the optional parameters of the drag recognizers.

Flutter: gestures/monodrag.dart DragGestureRecognizer.new

type DragStartBehavior

type DragStartBehavior int

DragStartBehavior is when a drag starts, for the details it reports.

Flutter: gestures/recognizer.dart DragStartBehavior

const (
	// DragStartBehaviorUnspecified is the zero value: the widget's default,
	// which is DragStartBehaviorStart.
	DragStartBehaviorUnspecified DragStartBehavior = iota
	// DragStartBehaviorDown starts the drag where the pointer touched down.
	//
	// Flutter: gestures/recognizer.dart DragStartBehavior.down
	DragStartBehaviorDown
	// DragStartBehaviorStart starts the drag where the pointer was when the
	// gesture won the arena.
	//
	// Flutter: gestures/recognizer.dart DragStartBehavior.start
	DragStartBehaviorStart
)

func (DragStartBehavior) Name

func (b DragStartBehavior) Name() string

Name returns the Dart name of the behavior.

Flutter: gestures/recognizer.dart DragStartBehavior

type DragStartDetails

type DragStartDetails struct {
	// GlobalPosition is the global position of the pointer when the drag
	// started.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// SourceTimeStamp is the time of the event that started the drag, if the
	// source gives one.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Kind is the kind of device that started the drag.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

DragStartDetails is the data of a drag that started.

Flutter: gestures/drag_details.dart DragStartDetails

func NewDragStartDetails

func NewDragStartDetails(opts ...DragStartOpts) DragStartDetails

NewDragStartDetails creates the details.

Flutter: gestures/drag_details.dart DragStartDetails.new

func (DragStartDetails) DebugFillProperties

func (d DragStartDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/drag_details.dart DragStartDetails.debugFillProperties

func (DragStartDetails) GetGlobalPosition

func (d DragStartDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/drag_details.dart DragStartDetails.globalPosition

func (DragStartDetails) GetLocalPosition

func (d DragStartDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/drag_details.dart DragStartDetails.localPosition

func (DragStartDetails) String

func (d DragStartDetails) String() string

String describes the details.

Flutter: gestures/drag_details.dart DragStartDetails.toString

type DragStartOpts

type DragStartOpts struct {
	// GlobalPosition is where the drag started, in global coordinates.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// SourceTimeStamp is the time of the event that started the drag.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Kind is the kind of device that started the drag.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

DragStartOpts are the optional parameters of NewDragStartDetails.

Flutter: gestures/drag_details.dart DragStartDetails.new

type DragUpdateDetails

type DragUpdateDetails struct {
	// GlobalPosition is the global position of the pointer.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// SourceTimeStamp is the time of the event that moved the pointer, if the
	// source gives one.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Delta is how far the pointer moved since the last update.
	Delta ui.Offset
	// PrimaryDelta is the amount the pointer moved along the primary axis of
	// the drag; None for a drag that has no primary axis.
	PrimaryDelta foundation.Opt[float64]
	// Kind is the kind of device that moved the pointer.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

DragUpdateDetails is the data of a pointer that moved while it dragged.

Flutter: gestures/drag_details.dart DragUpdateDetails

func NewDragUpdateDetails

func NewDragUpdateDetails(globalPosition ui.Offset, opts ...DragUpdateOpts) DragUpdateDetails

NewDragUpdateDetails creates the details for a pointer at the global position.

Flutter: gestures/drag_details.dart DragUpdateDetails.new

func (DragUpdateDetails) DebugFillProperties

func (d DragUpdateDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/drag_details.dart DragUpdateDetails.debugFillProperties

func (DragUpdateDetails) GetGlobalPosition

func (d DragUpdateDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/drag_details.dart DragUpdateDetails.globalPosition

func (DragUpdateDetails) GetLocalPosition

func (d DragUpdateDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/drag_details.dart DragUpdateDetails.localPosition

func (DragUpdateDetails) String

func (d DragUpdateDetails) String() string

String describes the details.

Flutter: gestures/drag_details.dart DragUpdateDetails.toString

type DragUpdateOpts

type DragUpdateOpts struct {
	// LocalPosition is the position in the coordinates of the target; the
	// default is the global position.
	LocalPosition foundation.Opt[ui.Offset]
	// SourceTimeStamp is the time of the event that moved the pointer.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Delta is how far the pointer moved since the last update.
	Delta ui.Offset
	// PrimaryDelta is the amount the pointer moved along the primary axis of
	// the drag. If given, the delta must be along that axis only, or a debug
	// build panics with the tag DragUpdatePrimaryDeltaInvalid.
	PrimaryDelta foundation.Opt[float64]
	// Kind is the kind of device that moved the pointer.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

DragUpdateOpts are the optional parameters of NewDragUpdateDetails.

Flutter: gestures/drag_details.dart DragUpdateDetails.new

type EagerGestureRecognizer

type EagerGestureRecognizer struct {
	OneSequenceGestureRecognizer
}

EagerGestureRecognizer wins the arena as soon as a pointer goes down. It is used to claim the pointers of a widget over the other recognizers.

Flutter: gestures/eager.dart EagerGestureRecognizer

func NewEagerGestureRecognizer

func NewEagerGestureRecognizer(binding *GestureBinding, opts ...EagerGestureRecognizerOpts) *EagerGestureRecognizer

NewEagerGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/eager.dart EagerGestureRecognizer.new

func (*EagerGestureRecognizer) AddAllowedPointer

func (r *EagerGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the pointer, wins the arena and stops tracking.

Flutter: gestures/eager.dart EagerGestureRecognizer.addAllowedPointer

func (*EagerGestureRecognizer) DebugDescription

func (r *EagerGestureRecognizer) DebugDescription() string

DebugDescription is "eager".

Flutter: gestures/eager.dart EagerGestureRecognizer.debugDescription

func (*EagerGestureRecognizer) DidStopTrackingLastPointer

func (r *EagerGestureRecognizer) DidStopTrackingLastPointer(int)

DidStopTrackingLastPointer does nothing.

Flutter: gestures/eager.dart EagerGestureRecognizer.didStopTrackingLastPointer

func (*EagerGestureRecognizer) HandleEvent

func (r *EagerGestureRecognizer) HandleEvent(PointerEvent)

HandleEvent does nothing.

Flutter: gestures/eager.dart EagerGestureRecognizer.handleEvent

type EagerGestureRecognizerOpts

type EagerGestureRecognizerOpts struct {
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	AllowedButtonsFilter AllowedButtonsFilter
}

EagerGestureRecognizerOpts are the optional parameters of NewEagerGestureRecognizer.

Flutter: gestures/eager.dart EagerGestureRecognizer.new

type GestureArenaEntry

type GestureArenaEntry interface {
	// Resolve accepts or rejects the entry's member in the arena. Resolving
	// again after the arena is resolved has no effect.
	//
	// Flutter: gestures/arena.dart GestureArenaEntry.resolve
	Resolve(disposition GestureDisposition)
}

GestureArenaEntry is a member's handle in the arena of a pointer. The member uses it to resolve.

Flutter: gestures/arena.dart GestureArenaEntry

type GestureArenaManager

type GestureArenaManager struct {
	// contains filtered or unexported fields
}

GestureArenaManager decides, for each pointer, which of the gestures that compete for it wins. The members that joined the arena of a pointer are resolved after its up event: the first member wins unless one of them has claimed the win or the others gave up earlier.

Flutter: gestures/arena.dart GestureArenaManager

func NewGestureArenaManager

func NewGestureArenaManager(scheduleMicrotask func(fn func()), opts ...GestureArenaManagerOpts) *GestureArenaManager

NewGestureArenaManager creates a manager. scheduleMicrotask runs a function after the work that is running now, before the next event; the binding passes its own microtask queue, which it drains before each pointer event.

Flutter: gestures/arena.dart GestureArenaManager.new

func (*GestureArenaManager) Add

Add adds the member to the arena of the pointer, opening the arena if it does not exist. Members can only join an open arena.

Flutter: gestures/arena.dart GestureArenaManager.add

func (*GestureArenaManager) Close

func (m *GestureArenaManager) Close(pointer int)

Close prevents new members from entering the arena of the pointer, and resolves it if it can be resolved. Call it when the pointer's down event has been dispatched.

Flutter: gestures/arena.dart GestureArenaManager.close

func (*GestureArenaManager) Hold

func (m *GestureArenaManager) Hold(pointer int)

Hold keeps the arena of the pointer from being swept, so that a gesture that ends later (such as a double tap) can still win. Call Release to let it resolve.

Flutter: gestures/arena.dart GestureArenaManager.hold

func (*GestureArenaManager) Release

func (m *GestureArenaManager) Release(pointer int)

Release lets the arena of the pointer be swept again, and sweeps it if a sweep was waiting.

Flutter: gestures/arena.dart GestureArenaManager.release

func (*GestureArenaManager) Sweep

func (m *GestureArenaManager) Sweep(pointer int)

Sweep forces the arena of the pointer to resolve: the first member wins and the others lose. Call it when the pointer's up event has been dispatched. An arena that is held resolves when it is released.

Flutter: gestures/arena.dart GestureArenaManager.sweep

type GestureArenaManagerOpts

type GestureArenaManagerOpts struct {
	// Debug gives the arena its diagnostics flags; nil prints nothing.
	Debug *DebugOptions
}

GestureArenaManagerOpts are the optional parameters of NewGestureArenaManager.

Flutter: gestures/arena.dart GestureArenaManager.new

type GestureArenaMember

type GestureArenaMember interface {
	// AcceptGesture is called when the member wins the arena for the pointer.
	//
	// Flutter: gestures/arena.dart GestureArenaMember.acceptGesture
	AcceptGesture(pointer int)
	// RejectGesture is called when the member loses the arena for the
	// pointer.
	//
	// Flutter: gestures/arena.dart GestureArenaMember.rejectGesture
	RejectGesture(pointer int)
}

GestureArenaMember is a participant in the arena: it learns whether it won or lost.

Flutter: gestures/arena.dart GestureArenaMember

type GestureArenaTeam

type GestureArenaTeam struct {

	// Captain is the member that wins when the team wins; if it is nil, the
	// first member to accept or the first to join wins.
	//
	// Flutter: gestures/team.dart GestureArenaTeam.captain
	Captain GestureArenaMember
	// contains filtered or unexported fields
}

GestureArenaTeam combines the members that join it into one member of the arena. The members are on the same team: only one of them wins, and the others lose with it. The captain, if there is one, wins when the team does.

Flutter: gestures/team.dart GestureArenaTeam

func NewGestureArenaTeam

func NewGestureArenaTeam(arena *GestureArenaManager) *GestureArenaTeam

NewGestureArenaTeam creates a team that competes in the arena.

Flutter: gestures/team.dart GestureArenaTeam.new

func (*GestureArenaTeam) Add

func (t *GestureArenaTeam) Add(pointer int, member GestureArenaMember) GestureArenaEntry

Add adds the member to the team's combined member in the arena of the pointer.

Flutter: gestures/team.dart GestureArenaTeam.add

type GestureBinding

type GestureBinding struct {

	// PointerRouter routes the events of a pointer to the routes registered
	// for it.
	//
	// Flutter: gestures/binding.dart GestureBinding.pointerRouter
	PointerRouter *PointerRouter
	// GestureArena decides which gesture of a pointer wins.
	//
	// Flutter: gestures/binding.dart GestureBinding.gestureArena
	GestureArena *GestureArenaManager
	// PointerSignalResolver decides who handles a signal event.
	//
	// Flutter: gestures/binding.dart GestureBinding.pointerSignalResolver
	PointerSignalResolver *PointerSignalResolver

	// Debug holds the diagnostics flags.
	Debug *DebugOptions

	// OnHitTestInView, if set, is called by HitTestInView before the binding
	// adds itself to the result. The renderer binding uses it to hit test the
	// render views.
	//
	// Flutter: rendering/binding.dart RendererBinding.hitTestInView
	OnHitTestInView func(result *HitTestResult, position ui.Offset, viewID ui.ViewID)
	// OnDispatchEvent, if set, is called by DispatchEvent before it sends the
	// event to the targets. The renderer binding uses it to update the mouse
	// tracker.
	//
	// Flutter: rendering/binding.dart RendererBinding.dispatchEvent
	OnDispatchEvent func(event PointerEvent, hitTestResult *HitTestResult)

	// ResamplingEnabled is whether touch events are resampled to the frame
	// times. It is off by default.
	//
	// Flutter: gestures/binding.dart GestureBinding.resamplingEnabled
	ResamplingEnabled bool
	// SamplingOffset is the time between the frame time and the sample time
	// when resampling. The default is -38ms.
	//
	// Flutter: gestures/binding.dart GestureBinding.samplingOffset
	SamplingOffset time.Duration
	// contains filtered or unexported fields
}

GestureBinding is the glue between the engine's pointer data and the gestures library: it converts the data to events, hit tests them, dispatches them to the targets that were hit, routes them and resolves the gesture arena.

The renderer binding plugs in the hit test with OnHitTestInView and the mouse tracking with OnDispatchEvent.

Deviation: Flutter's GestureBinding is a mixin on BindingBase with a global instance; here it is a struct that is made from the dispatcher and the scheduler (SPEC §12.10).

Flutter: gestures/binding.dart GestureBinding

func NewGestureBinding

func NewGestureBinding(d *ui.PlatformDispatcher, s GestureScheduler, opts ...GestureBindingOpts) *GestureBinding

NewGestureBinding creates the binding and sets it as the receiver of the dispatcher's pointer data.

Flutter: gestures/binding.dart GestureBinding.initInstances

func (*GestureBinding) CancelPointer

func (b *GestureBinding) CancelPointer(pointer int)

CancelPointer dispatches a cancel event for the pointer, before the events that are waiting.

Flutter: gestures/binding.dart GestureBinding.cancelPointer

func (*GestureBinding) Clock

func (b *GestureBinding) Clock() SamplingClock

Clock is the clock of the binding: the one given in the options, or the system clock.

Flutter: gestures/binding.dart GestureBinding.samplingClock

func (*GestureBinding) DispatchEvent

func (b *GestureBinding) DispatchEvent(event PointerEvent, hitTestResult *HitTestResult)

DispatchEvent sends the event to each target in the hit test result, front first, transformed to the target's coordinates. An event without a result (added and removed events) is only routed.

Flutter: gestures/binding.dart GestureBinding.dispatchEvent

func (*GestureBinding) HandleEvent

func (b *GestureBinding) HandleEvent(event PointerEvent, _ HitTestEntry)

HandleEvent routes the event, and manages the gesture arena and the signal resolver. It is the binding's part as the last target of a hit test.

Flutter: gestures/binding.dart GestureBinding.handleEvent

func (*GestureBinding) HandlePointerEvent

func (b *GestureBinding) HandlePointerEvent(event PointerEvent)

HandlePointerEvent dispatches the event to the targets it hits, after resampling it if resampling is enabled. It must not be called while the binding is locked.

Flutter: gestures/binding.dart GestureBinding.handlePointerEvent

func (*GestureBinding) HitTestInView

func (b *GestureBinding) HitTestInView(result *HitTestResult, position ui.Offset, viewID ui.ViewID)

HitTestInView adds the binding to the result, after OnHitTestInView had its turn. The binding is the last target of every hit test, so it routes the event and resolves the arena after the objects in front of it handled it.

Flutter: gestures/binding.dart GestureBinding.hitTestInView

func (*GestureBinding) NewTimer

func (b *GestureBinding) NewTimer(d time.Duration, fn func()) *Timer

NewTimer runs fn on the UI thread after d, unless the timer is cancelled first. The binding's clock says when.

Flutter: dart:async Timer.new

func (*GestureBinding) Post

func (b *GestureBinding) Post(fn func())

Post runs fn on the UI thread, after the work that is running now: the microtask of Dart.

Flutter: dart:async scheduleMicrotask

func (*GestureBinding) ResetGestureBinding

func (b *GestureBinding) ResetGestureBinding()

ResetGestureBinding forgets the hit tests of the pointers that are down. It is for tests.

Flutter: gestures/binding.dart GestureBinding.resetGestureBinding

func (*GestureBinding) Scheduler

func (b *GestureBinding) Scheduler() GestureScheduler

Scheduler is the scheduler the binding was made with.

func (*GestureBinding) SetErrorReporter

func (b *GestureBinding) SetErrorReporter(r foundation.ErrorReporter)

SetErrorReporter sets the function that receives the panics the binding recovers from: in the conversion of pointer data, in the targets of a hit test, in the routes of the pointer router and in the signal resolver. Without one a panic goes on (SPEC §14.2).

Flutter: foundation/assertions.dart FlutterError.onError

type GestureBindingOpts

type GestureBindingOpts struct {
	// Debug holds the diagnostics flags of the gestures library.
	Debug DebugOptions
	// Clock is the clock of the resampler, the recognizers' timers and the
	// velocity trackers; the default is the system clock. Tests give a fake
	// one.
	//
	// Flutter: gestures/binding.dart GestureBinding.debugSamplingClock
	Clock SamplingClock
	// ErrorReporter receives the panics the binding recovers from; see
	// SetErrorReporter.
	ErrorReporter foundation.ErrorReporter
}

GestureBindingOpts are the optional parameters of NewGestureBinding.

Flutter: gestures/binding.dart GestureBinding

type GestureCancelCallback

type GestureCancelCallback func()

GestureCancelCallback is called when the gesture is cancelled.

Flutter: gestures/tap_and_drag.dart GestureCancelCallback

type GestureDisposition

type GestureDisposition int

GestureDisposition is how a member of the arena resolves.

Flutter: gestures/arena.dart GestureDisposition

const (
	// GestureAccepted means the member wins the arena.
	//
	// Flutter: gestures/arena.dart GestureDisposition.accepted
	GestureAccepted GestureDisposition = iota + 1
	// GestureRejected means the member gives up.
	//
	// Flutter: gestures/arena.dart GestureDisposition.rejected
	GestureRejected
)

func (GestureDisposition) Name

func (d GestureDisposition) Name() string

Name returns the Dart name of the disposition.

Flutter: gestures/arena.dart GestureDisposition

type GestureDoubleTapCallback

type GestureDoubleTapCallback func()

GestureDoubleTapCallback is called when a double tap happens.

Flutter: gestures/multitap.dart GestureDoubleTapCallback

type GestureDragCancelCallback

type GestureDragCancelCallback func()

GestureDragCancelCallback is called when the pointer of a drag is cancelled.

Flutter: gestures/drag_details.dart GestureDragCancelCallback

type GestureDragDownCallback

type GestureDragDownCallback func(details DragDownDetails)

GestureDragDownCallback is called when a pointer that might drag touches the screen.

Flutter: gestures/drag_details.dart GestureDragDownCallback

type GestureDragEndCallback

type GestureDragEndCallback func(details DragEndDetails)

GestureDragEndCallback is called when a drag ends.

Flutter: gestures/drag_details.dart GestureDragEndCallback

type GestureDragStartCallback

type GestureDragStartCallback func(details DragStartDetails)

GestureDragStartCallback is called when a drag starts.

Flutter: gestures/drag_details.dart GestureDragStartCallback

type GestureDragUpdateCallback

type GestureDragUpdateCallback func(details DragUpdateDetails)

GestureDragUpdateCallback is called when a pointer moves while it drags.

Flutter: gestures/drag_details.dart GestureDragUpdateCallback

type GestureLongPressCallback

type GestureLongPressCallback func()

GestureLongPressCallback is called when a long press is recognized.

Flutter: gestures/long_press.dart GestureLongPressCallback

type GestureLongPressCancelCallback

type GestureLongPressCancelCallback func()

GestureLongPressCancelCallback is called when the pointer of a long press is cancelled.

Flutter: gestures/long_press.dart GestureLongPressCancelCallback

type GestureLongPressDownCallback

type GestureLongPressDownCallback func(details LongPressDownDetails)

GestureLongPressDownCallback is called when a pointer that might long press touches the screen.

Flutter: gestures/long_press.dart GestureLongPressDownCallback

type GestureLongPressEndCallback

type GestureLongPressEndCallback func(details LongPressEndDetails)

GestureLongPressEndCallback is called when the pointer of a long press is lifted.

Flutter: gestures/long_press.dart GestureLongPressEndCallback

type GestureLongPressMoveUpdateCallback

type GestureLongPressMoveUpdateCallback func(details LongPressMoveUpdateDetails)

GestureLongPressMoveUpdateCallback is called when the pointer moves during a long press.

Flutter: gestures/long_press.dart GestureLongPressMoveUpdateCallback

type GestureLongPressStartCallback

type GestureLongPressStartCallback func(details LongPressStartDetails)

GestureLongPressStartCallback is called when a long press is recognized.

Flutter: gestures/long_press.dart GestureLongPressStartCallback

type GestureLongPressUpCallback

type GestureLongPressUpCallback func()

GestureLongPressUpCallback is called when the pointer of a long press is lifted.

Flutter: gestures/long_press.dart GestureLongPressUpCallback

type GestureMultiDragStartCallback

type GestureMultiDragStartCallback func(position ui.Offset) Drag

GestureMultiDragStartCallback is called when a drag starts at a position. It returns the Drag to report the drag to, or nil to ignore it.

Flutter: gestures/multidrag.dart GestureMultiDragStartCallback

type GestureMultiTapCallback

type GestureMultiTapCallback func(pointer int)

GestureMultiTapCallback is called when a pointer taps.

Flutter: gestures/multitap.dart GestureMultiTapCallback

type GestureMultiTapCancelCallback

type GestureMultiTapCancelCallback func(pointer int)

GestureMultiTapCancelCallback is called when the pointer that sent a tap down will not tap.

Flutter: gestures/multitap.dart GestureMultiTapCancelCallback

type GestureMultiTapDownCallback

type GestureMultiTapDownCallback func(pointer int, details TapDownDetails)

GestureMultiTapDownCallback is called when a pointer that might tap touches the screen, with the pointer.

Flutter: gestures/multitap.dart GestureMultiTapDownCallback

type GestureMultiTapUpCallback

type GestureMultiTapUpCallback func(pointer int, details TapUpDetails)

GestureMultiTapUpCallback is called when a pointer that tapped is lifted.

Flutter: gestures/multitap.dart GestureMultiTapUpCallback

type GestureRecognizer

type GestureRecognizer interface {
	GestureArenaMember
	foundation.Diagnosticable
	// AddPointer starts tracking the pointer of the down event, if the
	// recognizer allows it.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.addPointer
	AddPointer(event *PointerDownEvent)
	// AddPointerPanZoom starts tracking the trackpad gesture, if the recognizer
	// allows it.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.addPointerPanZoom
	AddPointerPanZoom(event *PointerPanZoomStartEvent)
	// Dispose releases the resources of the recognizer. It must not be used
	// afterwards.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.dispose
	Dispose()
	// DebugDescription is a short name for debug output.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.debugDescription
	DebugDescription() string
	// Base returns the embedded base, whose fields (the supported devices, the
	// gesture settings and the button filter) the owner of the recognizer sets.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer
	Base() *GestureRecognizerBase
}

GestureRecognizer is the interface of all recognizers: it accepts pointers and takes part in the gesture arena.

A recognizer is built from the embedded GestureRecognizerBase, then OneSequenceGestureRecognizer and PrimaryPointerGestureRecognizer, as Flutter's classes extend one another. The base calls the methods the subclass overrides (Dart's virtual methods) through the "self" the subclass gives to its Init.

Flutter: gestures/recognizer.dart GestureRecognizer

type GestureRecognizerBase

type GestureRecognizerBase struct {

	// DebugOwner is the object that owns the recognizer, for debug output.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.debugOwner
	DebugOwner any
	// GestureSettings are the gesture thresholds of the device; the owner sets
	// them from the media query.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.gestureSettings
	GestureSettings foundation.Opt[DeviceGestureSettings]
	// SupportedDevices are the kinds of pointer the recognizer accepts. If it
	// is nil, all kinds are accepted; if it is empty, none is.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.supportedDevices
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.allowedButtonsFilter
	AllowedButtonsFilter AllowedButtonsFilter
	// contains filtered or unexported fields
}

GestureRecognizerBase is the state and behavior that all recognizers share. Embed it through OneSequenceGestureRecognizer or one of the recognizers that extend it.

Flutter: gestures/recognizer.dart GestureRecognizer

func (*GestureRecognizerBase) AddAllowedPointer

func (r *GestureRecognizerBase) AddAllowedPointer(*PointerDownEvent)

AddAllowedPointer is called for a pointer that the recognizer allows. The default does nothing.

Flutter: gestures/recognizer.dart GestureRecognizer.addAllowedPointer

func (*GestureRecognizerBase) AddAllowedPointerPanZoom

func (r *GestureRecognizerBase) AddAllowedPointerPanZoom(*PointerPanZoomStartEvent)

AddAllowedPointerPanZoom is called for a trackpad gesture that the recognizer allows. The default does nothing.

Flutter: gestures/recognizer.dart GestureRecognizer.addAllowedPointerPanZoom

func (*GestureRecognizerBase) AddPointer

func (r *GestureRecognizerBase) AddPointer(event *PointerDownEvent)

AddPointer remembers the kind and buttons of the pointer, and hands it to AddAllowedPointer, or to HandleNonAllowedPointer if it is not allowed.

Deviation: it remembers the kind and buttons of the last 256 pointers, not of all of them (SPEC §12.10).

Flutter: gestures/recognizer.dart GestureRecognizer.addPointer

func (*GestureRecognizerBase) AddPointerPanZoom

func (r *GestureRecognizerBase) AddPointerPanZoom(event *PointerPanZoomStartEvent)

AddPointerPanZoom remembers the kind and buttons of the pointer, and hands the trackpad gesture to AddAllowedPointerPanZoom, or to HandleNonAllowedPointerPanZoom if it is not allowed.

Flutter: gestures/recognizer.dart GestureRecognizer.addPointerPanZoom

func (*GestureRecognizerBase) Base

Base returns the base, for the GestureRecognizer interface.

Flutter: gestures/recognizer.dart GestureRecognizer

func (*GestureRecognizerBase) Binding

func (r *GestureRecognizerBase) Binding() *GestureBinding

Binding is the gesture binding the recognizer works with.

Deviation: Flutter's recognizers reach GestureBinding.instance (SPEC §12.10).

Flutter: gestures/recognizer.dart GestureRecognizerBase.GestureBinding.instance

func (*GestureRecognizerBase) DebugFillProperties

DebugFillProperties adds the debug owner.

Flutter: gestures/recognizer.dart GestureRecognizer.debugFillProperties

func (*GestureRecognizerBase) Dispose

func (r *GestureRecognizerBase) Dispose()

Dispose releases the recognizer.

Flutter: gestures/recognizer.dart GestureRecognizer.dispose

func (*GestureRecognizerBase) GetButtonsForPointer

func (r *GestureRecognizerBase) GetButtonsForPointer(pointer int) int

GetButtonsForPointer is the buttons that were pressed when the pointer was added.

Flutter: gestures/recognizer.dart GestureRecognizer.getButtonsForPointer

func (*GestureRecognizerBase) GetKindForPointer

func (r *GestureRecognizerBase) GetKindForPointer(pointer int) ui.PointerDeviceKind

GetKindForPointer is the kind of device of the pointer, which must have been added with AddPointer or AddPointerPanZoom.

Flutter: gestures/recognizer.dart GestureRecognizer.getKindForPointer

func (*GestureRecognizerBase) HandleNonAllowedPointer

func (r *GestureRecognizerBase) HandleNonAllowedPointer(*PointerDownEvent)

HandleNonAllowedPointer is called for a pointer that the recognizer does not allow. The default does nothing.

Flutter: gestures/recognizer.dart GestureRecognizer.handleNonAllowedPointer

func (*GestureRecognizerBase) HandleNonAllowedPointerPanZoom

func (r *GestureRecognizerBase) HandleNonAllowedPointerPanZoom(*PointerPanZoomStartEvent)

HandleNonAllowedPointerPanZoom is called for a trackpad gesture that the recognizer does not allow. The default does nothing.

Flutter: gestures/recognizer.dart GestureRecognizer.handleNonAllowedPointerPanZoom

func (*GestureRecognizerBase) Init

Init sets up the base. self is the recognizer that embeds it (usually its pointer), which the base calls for the methods the recognizer overrides.

Flutter: gestures/recognizer.dart GestureRecognizer.new

func (*GestureRecognizerBase) InvokeCallback

func (r *GestureRecognizerBase) InvokeCallback(name string, callback func(), debugReport ...func() string)

InvokeCallback calls a callback of the recognizer. The call is a recovery point (SPEC §14.2), and it prints a trace if the debug flag is on; debugReport adds text to the trace.

Flutter: gestures/recognizer.dart GestureRecognizer.invokeCallback

func (*GestureRecognizerBase) IsPointerAllowed

func (r *GestureRecognizerBase) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed reports whether the device of the pointer is supported and its buttons pass the filter.

Flutter: gestures/recognizer.dart GestureRecognizer.isPointerAllowed

func (*GestureRecognizerBase) IsPointerPanZoomAllowed

func (r *GestureRecognizerBase) IsPointerPanZoomAllowed(event *PointerPanZoomStartEvent) bool

IsPointerPanZoomAllowed reports whether the device of the trackpad gesture is supported.

Flutter: gestures/recognizer.dart GestureRecognizer.isPointerPanZoomAllowed

type GestureRecognizerHooks

type GestureRecognizerHooks interface {
	GestureRecognizer
	// AddAllowedPointer is called by AddPointer for a pointer that
	// IsPointerAllowed.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.addAllowedPointer
	AddAllowedPointer(event *PointerDownEvent)
	// HandleNonAllowedPointer is called by AddPointer for a pointer that is not
	// allowed.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.handleNonAllowedPointer
	HandleNonAllowedPointer(event *PointerDownEvent)
	// IsPointerAllowed says whether the recognizer takes the pointer: its
	// device is supported and its buttons pass the filter.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.isPointerAllowed
	IsPointerAllowed(event *PointerDownEvent) bool
	// AddAllowedPointerPanZoom is called by AddPointerPanZoom for a gesture
	// that IsPointerPanZoomAllowed.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.addAllowedPointerPanZoom
	AddAllowedPointerPanZoom(event *PointerPanZoomStartEvent)
	// HandleNonAllowedPointerPanZoom is called by AddPointerPanZoom for a
	// gesture that is not allowed.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.handleNonAllowedPointerPanZoom
	HandleNonAllowedPointerPanZoom(event *PointerPanZoomStartEvent)
	// IsPointerPanZoomAllowed says whether the recognizer takes the trackpad
	// gesture: its device is supported.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizer.isPointerPanZoomAllowed
	IsPointerPanZoomAllowed(event *PointerPanZoomStartEvent) bool
}

GestureRecognizerHooks are the methods of a recognizer that GestureRecognizerBase calls and a subclass may override. The base has a default for each.

Flutter: gestures/recognizer.dart GestureRecognizer

type GestureRecognizerOpts

type GestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer, for debug output.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts. If it
	// is nil, all kinds are accepted; if it is empty, none is.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed;
	// the default allows any buttons.
	AllowedButtonsFilter AllowedButtonsFilter
}

GestureRecognizerOpts are the optional parameters that every recognizer takes. The options structs of the recognizers repeat these fields.

Flutter: gestures/recognizer.dart GestureRecognizer.new

type GestureRecognizerState

type GestureRecognizerState int

GestureRecognizerState is the state of a PrimaryPointerGestureRecognizer.

Flutter: gestures/recognizer.dart GestureRecognizerState

const (
	// GestureRecognizerStateUnspecified is the zero value; it is never a
	// state.
	GestureRecognizerStateUnspecified GestureRecognizerState = iota
	// GestureRecognizerStateReady means the recognizer is ready to start
	// recognizing a gesture.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizerState.ready
	GestureRecognizerStateReady
	// GestureRecognizerStatePossible means a pointer is down and the recognizer
	// is trying to decide whether it is a gesture.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizerState.possible
	GestureRecognizerStatePossible
	// GestureRecognizerStateDefunct means the pointer is no longer being
	// considered, as the recognizer lost or gave up.
	//
	// Flutter: gestures/recognizer.dart GestureRecognizerState.defunct
	GestureRecognizerStateDefunct
)

func (GestureRecognizerState) Name

func (s GestureRecognizerState) Name() string

Name returns the Dart name of the state.

Flutter: gestures/recognizer.dart GestureRecognizerState

type GestureScaleEndCallback

type GestureScaleEndCallback func(details ScaleEndDetails)

GestureScaleEndCallback is called when a scale gesture ends.

Flutter: gestures/scale.dart GestureScaleEndCallback

type GestureScaleStartCallback

type GestureScaleStartCallback func(details ScaleStartDetails)

GestureScaleStartCallback is called when a scale gesture starts.

Flutter: gestures/scale.dart GestureScaleStartCallback

type GestureScaleUpdateCallback

type GestureScaleUpdateCallback func(details ScaleUpdateDetails)

GestureScaleUpdateCallback is called when a scale gesture changes.

Flutter: gestures/scale.dart GestureScaleUpdateCallback

type GestureScheduler

type GestureScheduler interface {
	// Locked reports whether events are held back.
	Locked() bool
	// AddUnlockedCallback adds a function that runs when events are unlocked.
	AddUnlockedCallback(fn func())
	// AddPostFrameCallback runs the callback after the current frame.
	AddPostFrameCallback(callback scheduler.FrameCallback)
	// CurrentSystemFrameTimeStamp is the time of the current frame, as the
	// platform gave it.
	CurrentSystemFrameTimeStamp() time.Duration
}

GestureScheduler is what the GestureBinding needs of the scheduler binding. *scheduler.SchedulerBinding implements it.

Flutter: no counterpart

type GestureSerialTapCancelCallback

type GestureSerialTapCancelCallback func(details SerialTapCancelDetails)

GestureSerialTapCancelCallback is called when a tap of a series is cancelled.

Flutter: gestures/multitap.dart GestureSerialTapCancelCallback

type GestureSerialTapDownCallback

type GestureSerialTapDownCallback func(details SerialTapDownDetails)

GestureSerialTapDownCallback is called when a pointer that might be a tap of a series touches the screen.

Flutter: gestures/multitap.dart GestureSerialTapDownCallback

type GestureSerialTapUpCallback

type GestureSerialTapUpCallback func(details SerialTapUpDetails)

GestureSerialTapUpCallback is called when a tap of a series ends.

Flutter: gestures/multitap.dart GestureSerialTapUpCallback

type GestureTapCallback

type GestureTapCallback func()

GestureTapCallback is called when a tap happens.

Flutter: gestures/tap.dart GestureTapCallback

type GestureTapCancelCallback

type GestureTapCancelCallback func()

GestureTapCancelCallback is called when the pointer of a tap is cancelled.

Flutter: gestures/tap.dart GestureTapCancelCallback

type GestureTapDownCallback

type GestureTapDownCallback func(details TapDownDetails)

GestureTapDownCallback is called when a pointer that might tap touches the screen.

Flutter: gestures/tap.dart GestureTapDownCallback

type GestureTapDragDownCallback

type GestureTapDragDownCallback func(details TapDragDownDetails)

GestureTapDragDownCallback is called when a pointer that might tap or drag touches the screen.

Flutter: gestures/tap_and_drag.dart GestureTapDragDownCallback

type GestureTapDragEndCallback

type GestureTapDragEndCallback func(endDetails TapDragEndDetails)

GestureTapDragEndCallback is called when a drag after a tap ends.

Flutter: gestures/tap_and_drag.dart GestureTapDragEndCallback

type GestureTapDragStartCallback

type GestureTapDragStartCallback func(details TapDragStartDetails)

GestureTapDragStartCallback is called when a drag starts after a tap.

Flutter: gestures/tap_and_drag.dart GestureTapDragStartCallback

type GestureTapDragUpCallback

type GestureTapDragUpCallback func(details TapDragUpDetails)

GestureTapDragUpCallback is called when a tap ends.

Flutter: gestures/tap_and_drag.dart GestureTapDragUpCallback

type GestureTapDragUpdateCallback

type GestureTapDragUpdateCallback func(details TapDragUpdateDetails)

GestureTapDragUpdateCallback is called when the pointer moves during a drag after a tap.

Flutter: gestures/tap_and_drag.dart GestureTapDragUpdateCallback

type GestureTapMoveCallback

type GestureTapMoveCallback func(details TapMoveDetails)

GestureTapMoveCallback is called when a pointer that might tap moves.

Flutter: gestures/tap.dart GestureTapMoveCallback

type GestureTapUpCallback

type GestureTapUpCallback func(details TapUpDetails)

GestureTapUpCallback is called when a pointer that tapped stops touching the screen.

Flutter: gestures/tap.dart GestureTapUpCallback

type GestureVelocityTrackerBuilder

type GestureVelocityTrackerBuilder func(event PointerEvent) *VelocityTracker

GestureVelocityTrackerBuilder makes the velocity tracker for a pointer.

Flutter: gestures/monodrag.dart GestureVelocityTrackerBuilder

type HandleEventCallback

type HandleEventCallback func(event PointerEvent)

HandleEventCallback receives the events a resampler makes.

Flutter: gestures/resampler.dart HandleEventCallback

type HitTestDispatcher

type HitTestDispatcher interface {
	// DispatchEvent sends the event to the targets in the result.
	//
	// Flutter: gestures/hit_test.dart HitTestDispatcher.dispatchEvent
	DispatchEvent(event PointerEvent, result *HitTestResult)
}

HitTestDispatcher is an object that can dispatch events to the targets of a hit test.

Flutter: gestures/hit_test.dart HitTestDispatcher

type HitTestEntry

type HitTestEntry interface {
	// Target is the object the hit test found.
	//
	// Flutter: gestures/hit_test.dart HitTestEntry.target
	Target() HitTestTarget
	// Transform is the matrix that takes the global coordinates to those of
	// the target. It is nil until the entry is added to a HitTestResult.
	//
	// Flutter: gestures/hit_test.dart HitTestEntry.transform
	Transform() *ui.Matrix4
	// contains filtered or unexported methods
}

HitTestEntry is the data about a target that a hit test found: the target and the transform from the global coordinates to its own. A type that adds data to an entry (such as rendering's BoxHitTestEntry) embeds HitTestEntryBase.

Deviation: Flutter's HitTestEntry is a generic class that subclasses extend; Go's is an interface with a struct to embed (SPEC §12.10).

Flutter: gestures/hit_test.dart HitTestEntry

type HitTestEntryBase

type HitTestEntryBase struct {
	// contains filtered or unexported fields
}

HitTestEntryBase is the implementation of HitTestEntry to create or embed.

Flutter: gestures/hit_test.dart HitTestEntry

func NewHitTestEntry

func NewHitTestEntry(target HitTestTarget) *HitTestEntryBase

NewHitTestEntry creates an entry for the target.

Flutter: gestures/hit_test.dart HitTestEntry.new

func (*HitTestEntryBase) String

func (e *HitTestEntryBase) String() string

String describes the entry by its target.

Flutter: gestures/hit_test.dart HitTestEntry.toString

func (*HitTestEntryBase) Target

func (e *HitTestEntryBase) Target() HitTestTarget

Target is the object the hit test found.

Flutter: gestures/hit_test.dart HitTestEntry.target

func (*HitTestEntryBase) Transform

func (e *HitTestEntryBase) Transform() *ui.Matrix4

Transform is the matrix that takes the global coordinates to those of the target. It is nil until the entry is added to a HitTestResult.

Flutter: gestures/hit_test.dart HitTestEntry.transform

type HitTestResult

type HitTestResult struct {
	// contains filtered or unexported fields
}

HitTestResult is the list of targets a hit test found, front first, with the transform to each.

Flutter: gestures/hit_test.dart HitTestResult

func NewHitTestResult

func NewHitTestResult() *HitTestResult

NewHitTestResult creates an empty result.

Flutter: gestures/hit_test.dart HitTestResult.new

func NewHitTestResultWrap

func NewHitTestResultWrap(result *HitTestResult) *HitTestResult

NewHitTestResultWrap creates a result that shares its path and transforms with result. A subtype that adds data to a result (rendering's BoxHitTestResult) wraps one.

Flutter: gestures/hit_test.dart HitTestResult.wrap

func (*HitTestResult) Add

func (r *HitTestResult) Add(entry HitTestEntry)

Add adds an entry to the path. The entry's transform is the one that is on top of the transform stack now.

Flutter: gestures/hit_test.dart HitTestResult.add

func (*HitTestResult) Path

func (r *HitTestResult) Path() []HitTestEntry

Path is the targets the hit test found, front first.

Flutter: gestures/hit_test.dart HitTestResult.path

func (*HitTestResult) PopTransform

func (r *HitTestResult) PopTransform()

PopTransform removes the transform pushed last.

Flutter: gestures/hit_test.dart HitTestResult.popTransform

func (*HitTestResult) PushOffset

func (r *HitTestResult) PushOffset(offset ui.Offset)

PushOffset pushes a translation from the parent's coordinates to the child's. Call PopTransform when the child is done.

Flutter: gestures/hit_test.dart HitTestResult.pushOffset

func (*HitTestResult) PushTransform

func (r *HitTestResult) PushTransform(transform *ui.Matrix4)

PushTransform pushes a transform from the parent's coordinates to the child's. Call PopTransform when the child is done. Its third row and column must be the identity's (see RemovePerspectiveTransform), or a debug build panics with the tag HitTestTransformPerspective.

Flutter: gestures/hit_test.dart HitTestResult.pushTransform

func (*HitTestResult) String

func (r *HitTestResult) String() string

String lists the entries of the path.

Flutter: gestures/hit_test.dart HitTestResult.toString

type HitTestTarget

type HitTestTarget interface {
	// HandleEvent is called with an event that happened on the target. The
	// event is transformed to the coordinates of the entry.
	//
	// Flutter: gestures/hit_test.dart HitTestTarget.handleEvent
	HandleEvent(event PointerEvent, entry HitTestEntry)
}

HitTestTarget is an object that can receive events.

Flutter: gestures/hit_test.dart HitTestTarget

type HitTestable

type HitTestable interface {
	// HitTestInView adds to result the objects under the position in the
	// view, front first.
	//
	// Flutter: gestures/hit_test.dart HitTestable.hitTestInView
	HitTestInView(result *HitTestResult, position ui.Offset, viewID ui.ViewID)
}

HitTestable is an object that can be hit tested: asked which of the objects in it are under a position.

Deviation: the deprecated hitTest, which tested the implicit view, is not ported (SPEC §12.10).

Flutter: gestures/hit_test.dart HitTestable

type HorizontalDragGestureRecognizer

type HorizontalDragGestureRecognizer struct{ DragGestureRecognizer }

HorizontalDragGestureRecognizer recognizes movement in the horizontal direction.

Flutter: gestures/monodrag.dart HorizontalDragGestureRecognizer

func NewHorizontalDragGestureRecognizer

func NewHorizontalDragGestureRecognizer(binding *GestureBinding, opts ...DragGestureRecognizerOpts) *HorizontalDragGestureRecognizer

NewHorizontalDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/monodrag.dart HorizontalDragGestureRecognizer.new

type HorizontalMultiDragGestureRecognizer

type HorizontalMultiDragGestureRecognizer struct{ MultiDragGestureRecognizer }

HorizontalMultiDragGestureRecognizer starts a drag as soon as a pointer moves past the slop horizontally.

Flutter: gestures/multidrag.dart HorizontalMultiDragGestureRecognizer

func NewHorizontalMultiDragGestureRecognizer

func NewHorizontalMultiDragGestureRecognizer(binding *GestureBinding, opts ...MultiDragGestureRecognizerOpts) *HorizontalMultiDragGestureRecognizer

NewHorizontalMultiDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multidrag.dart HorizontalMultiDragGestureRecognizer.new

func (*HorizontalMultiDragGestureRecognizer) CreateNewPointerState

CreateNewPointerState makes the state of the pointer.

Flutter: gestures/multidrag.dart HorizontalMultiDragGestureRecognizer.createNewPointerState

func (*HorizontalMultiDragGestureRecognizer) DebugDescription

func (r *HorizontalMultiDragGestureRecognizer) DebugDescription() string

DebugDescription is "horizontal multidrag".

Flutter: gestures/multidrag.dart HorizontalMultiDragGestureRecognizer.debugDescription

type ImmediateMultiDragGestureRecognizer

type ImmediateMultiDragGestureRecognizer struct{ MultiDragGestureRecognizer }

ImmediateMultiDragGestureRecognizer starts a drag as soon as a pointer moves past the slop in any direction.

Flutter: gestures/multidrag.dart ImmediateMultiDragGestureRecognizer

func NewImmediateMultiDragGestureRecognizer

func NewImmediateMultiDragGestureRecognizer(binding *GestureBinding, opts ...MultiDragGestureRecognizerOpts) *ImmediateMultiDragGestureRecognizer

NewImmediateMultiDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multidrag.dart ImmediateMultiDragGestureRecognizer.new

func (*ImmediateMultiDragGestureRecognizer) CreateNewPointerState

CreateNewPointerState makes the state of the pointer.

Flutter: gestures/multidrag.dart ImmediateMultiDragGestureRecognizer.createNewPointerState

func (*ImmediateMultiDragGestureRecognizer) DebugDescription

func (r *ImmediateMultiDragGestureRecognizer) DebugDescription() string

DebugDescription is "multidrag".

Flutter: gestures/multidrag.dart ImmediateMultiDragGestureRecognizer.debugDescription

type LeastSquaresSolver

type LeastSquaresSolver struct {
	// contains filtered or unexported fields
}

LeastSquaresSolver fits a polynomial to points by the method of least squares, weighting each point.

Flutter: gestures/lsq_solver.dart LeastSquaresSolver

func NewLeastSquaresSolver

func NewLeastSquaresSolver(x, y, w []float64) *LeastSquaresSolver

NewLeastSquaresSolver creates a solver for the points (x[i], y[i]) with the weights w[i]. The three slices must have the same length, or a debug build panics with the tag LeastSquaresLengthMismatch.

Flutter: gestures/lsq_solver.dart LeastSquaresSolver.new

func (*LeastSquaresSolver) Solve

func (s *LeastSquaresSolver) Solve(degree int) *PolynomialFit

Solve fits a polynomial of the degree. It returns nil if there are fewer points than the degree, or if the points do not determine a polynomial.

Flutter: gestures/lsq_solver.dart LeastSquaresSolver.solve

type LongPressDownDetails

type LongPressDownDetails struct {
	// GlobalPosition is where the pointer touched the screen.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

LongPressDownDetails is the data of a pointer that touched the screen and might long press.

Flutter: gestures/long_press.dart LongPressDownDetails

func NewLongPressDownDetails

func NewLongPressDownDetails(opts ...TapDownOpts) LongPressDownDetails

NewLongPressDownDetails creates the details; the local position is the global one unless given.

Flutter: gestures/long_press.dart LongPressDownDetails.new

func (LongPressDownDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/long_press.dart LongPressDownDetails.debugFillProperties

func (LongPressDownDetails) GetGlobalPosition

func (d LongPressDownDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/long_press.dart LongPressDownDetails.globalPosition

func (LongPressDownDetails) GetLocalPosition

func (d LongPressDownDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/long_press.dart LongPressDownDetails.localPosition

type LongPressEndDetails

type LongPressEndDetails struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Velocity is the velocity of the pointer when it was lifted.
	Velocity Velocity
}

LongPressEndDetails is the data of a long press that ended.

Flutter: gestures/long_press.dart LongPressEndDetails

func NewLongPressEndDetails

func NewLongPressEndDetails(opts ...LongPressEndOpts) LongPressEndDetails

NewLongPressEndDetails creates the details.

Flutter: gestures/long_press.dart LongPressEndDetails.new

func (LongPressEndDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/long_press.dart LongPressEndDetails.debugFillProperties

func (LongPressEndDetails) GetGlobalPosition

func (d LongPressEndDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/long_press.dart LongPressEndDetails.globalPosition

func (LongPressEndDetails) GetLocalPosition

func (d LongPressEndDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/long_press.dart LongPressEndDetails.localPosition

type LongPressEndOpts

type LongPressEndOpts struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// Velocity is the velocity of the pointer.
	Velocity Velocity
}

LongPressEndOpts are the optional parameters of NewLongPressEndDetails.

Flutter: gestures/long_press.dart LongPressEndDetails.new

type LongPressGestureRecognizer

type LongPressGestureRecognizer struct {
	PrimaryPointerGestureRecognizer

	// OnLongPressDown is called when a pointer that might long press with the
	// primary button touches the screen.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPressDown
	OnLongPressDown GestureLongPressDownCallback
	// OnLongPressCancel is called when the pointer that sent OnLongPressDown
	// will not long press.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPressCancel
	OnLongPressCancel GestureLongPressCancelCallback
	// OnLongPress is called when a long press with the primary button is
	// recognized.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPress
	OnLongPress GestureLongPressCallback
	// OnLongPressStart is called when a long press with the primary button is
	// recognized.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPressStart
	OnLongPressStart GestureLongPressStartCallback
	// OnLongPressMoveUpdate is called when the pointer moves during a long
	// press with the primary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPressMoveUpdate
	OnLongPressMoveUpdate GestureLongPressMoveUpdateCallback
	// OnLongPressUp is called when the pointer of a long press with the primary
	// button is lifted.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPressUp
	OnLongPressUp GestureLongPressUpCallback
	// OnLongPressEnd is called when the pointer of a long press with the
	// primary button is lifted.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onLongPressEnd
	OnLongPressEnd GestureLongPressEndCallback
	// OnSecondaryLongPressDown is OnLongPressDown for the secondary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPressDown
	OnSecondaryLongPressDown GestureLongPressDownCallback
	// OnSecondaryLongPressCancel is OnLongPressCancel for the secondary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPressCancel
	OnSecondaryLongPressCancel GestureLongPressCancelCallback
	// OnSecondaryLongPress is OnLongPress for the secondary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPress
	OnSecondaryLongPress GestureLongPressCallback
	// OnSecondaryLongPressStart is OnLongPressStart for the secondary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPressStart
	OnSecondaryLongPressStart GestureLongPressStartCallback
	// OnSecondaryLongPressMoveUpdate is OnLongPressMoveUpdate for the secondary
	// button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPressMoveUpdate
	OnSecondaryLongPressMoveUpdate GestureLongPressMoveUpdateCallback
	// OnSecondaryLongPressUp is OnLongPressUp for the secondary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPressUp
	OnSecondaryLongPressUp GestureLongPressUpCallback
	// OnSecondaryLongPressEnd is OnLongPressEnd for the secondary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onSecondaryLongPressEnd
	OnSecondaryLongPressEnd GestureLongPressEndCallback
	// OnTertiaryLongPressDown is OnLongPressDown for the tertiary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPressDown
	OnTertiaryLongPressDown GestureLongPressDownCallback
	// OnTertiaryLongPressCancel is OnLongPressCancel for the tertiary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPressCancel
	OnTertiaryLongPressCancel GestureLongPressCancelCallback
	// OnTertiaryLongPress is OnLongPress for the tertiary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPress
	OnTertiaryLongPress GestureLongPressCallback
	// OnTertiaryLongPressStart is OnLongPressStart for the tertiary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPressStart
	OnTertiaryLongPressStart GestureLongPressStartCallback
	// OnTertiaryLongPressMoveUpdate is OnLongPressMoveUpdate for the tertiary
	// button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPressMoveUpdate
	OnTertiaryLongPressMoveUpdate GestureLongPressMoveUpdateCallback
	// OnTertiaryLongPressUp is OnLongPressUp for the tertiary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPressUp
	OnTertiaryLongPressUp GestureLongPressUpCallback
	// OnTertiaryLongPressEnd is OnLongPressEnd for the tertiary button.
	//
	// Flutter: gestures/long_press.dart LongPressGestureRecognizer.onTertiaryLongPressEnd
	OnTertiaryLongPressEnd GestureLongPressEndCallback
	// contains filtered or unexported fields
}

LongPressGestureRecognizer recognizes a pointer that stays down for a time (LongPressTimeout by default) without moving past the slop.

Flutter: gestures/long_press.dart LongPressGestureRecognizer

func NewLongPressGestureRecognizer

func NewLongPressGestureRecognizer(binding *GestureBinding, opts ...LongPressGestureRecognizerOpts) *LongPressGestureRecognizer

NewLongPressGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.new

func (*LongPressGestureRecognizer) AcceptGesture

func (r *LongPressGestureRecognizer) AcceptGesture(int)

AcceptGesture does nothing: the recognizer accepts itself when the deadline passes.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.acceptGesture

func (*LongPressGestureRecognizer) DebugDescription

func (r *LongPressGestureRecognizer) DebugDescription() string

DebugDescription is "long press".

Flutter: gestures/long_press.dart LongPressGestureRecognizer.debugDescription

func (*LongPressGestureRecognizer) DidExceedDeadline

func (r *LongPressGestureRecognizer) DidExceedDeadline()

DidExceedDeadline accepts the long press.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.didExceedDeadline

func (*LongPressGestureRecognizer) HandlePrimaryPointer

func (r *LongPressGestureRecognizer) HandlePrimaryPointer(event PointerEvent)

HandlePrimaryPointer follows the primary pointer.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.handlePrimaryPointer

func (*LongPressGestureRecognizer) IsPointerAllowed

func (r *LongPressGestureRecognizer) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed allows a pointer whose button has a callback.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.isPointerAllowed

func (*LongPressGestureRecognizer) Resolve

func (r *LongPressGestureRecognizer) Resolve(disposition GestureDisposition)

Resolve cancels or resets the long press when it is rejected, then resolves.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.resolve

type LongPressGestureRecognizerOpts

type LongPressGestureRecognizerOpts struct {
	// Duration is how long the pointer must stay down; the default is
	// LongPressTimeout.
	Duration foundation.Opt[time.Duration]
	// PostAcceptSlopTolerance is how far the pointer may move after the long
	// press was recognized; the default (None) is any distance.
	PostAcceptSlopTolerance foundation.Opt[float64]
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed;
	// the default allows the primary, secondary and tertiary buttons.
	AllowedButtonsFilter AllowedButtonsFilter
}

LongPressGestureRecognizerOpts are the optional parameters of NewLongPressGestureRecognizer.

Flutter: gestures/long_press.dart LongPressGestureRecognizer.new

type LongPressMoveUpdateDetails

type LongPressMoveUpdateDetails struct {
	// GlobalPosition is the global position of the pointer.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// OffsetFromOrigin is how far the pointer is from where the long press
	// started, in global coordinates.
	OffsetFromOrigin ui.Offset
	// LocalOffsetFromOrigin is OffsetFromOrigin in the coordinates of the
	// target.
	LocalOffsetFromOrigin ui.Offset
}

LongPressMoveUpdateDetails is the data of a pointer that moved during a long press.

Flutter: gestures/long_press.dart LongPressMoveUpdateDetails

func NewLongPressMoveUpdateDetails

func NewLongPressMoveUpdateDetails(opts ...LongPressMoveUpdateOpts) LongPressMoveUpdateDetails

NewLongPressMoveUpdateDetails creates the details.

Flutter: gestures/long_press.dart LongPressMoveUpdateDetails.new

func (LongPressMoveUpdateDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/long_press.dart LongPressMoveUpdateDetails.debugFillProperties

func (LongPressMoveUpdateDetails) GetGlobalPosition

func (d LongPressMoveUpdateDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/long_press.dart LongPressMoveUpdateDetails.globalPosition

func (LongPressMoveUpdateDetails) GetLocalPosition

func (d LongPressMoveUpdateDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/long_press.dart LongPressMoveUpdateDetails.localPosition

type LongPressMoveUpdateOpts

type LongPressMoveUpdateOpts struct {
	// GlobalPosition is the global position of the pointer.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// OffsetFromOrigin is how far the pointer is from where the long press
	// started.
	OffsetFromOrigin ui.Offset
	// LocalOffsetFromOrigin is OffsetFromOrigin in local coordinates; the
	// default is OffsetFromOrigin.
	LocalOffsetFromOrigin foundation.Opt[ui.Offset]
}

LongPressMoveUpdateOpts are the optional parameters of NewLongPressMoveUpdateDetails.

Flutter: gestures/long_press.dart LongPressMoveUpdateDetails.new

type LongPressStartDetails

type LongPressStartDetails struct {
	// GlobalPosition is where the long press started.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
}

LongPressStartDetails is the data of a long press that started.

Flutter: gestures/long_press.dart LongPressStartDetails

func NewLongPressStartDetails

func NewLongPressStartDetails(opts ...TapUpOpts) LongPressStartDetails

NewLongPressStartDetails creates the details; the local position is the global one unless given.

Flutter: gestures/long_press.dart LongPressStartDetails.new

func (LongPressStartDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/long_press.dart LongPressStartDetails.debugFillProperties

func (LongPressStartDetails) GetGlobalPosition

func (d LongPressStartDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/long_press.dart LongPressStartDetails.globalPosition

func (LongPressStartDetails) GetLocalPosition

func (d LongPressStartDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/long_press.dart LongPressStartDetails.localPosition

type MultiDragGestureRecognizer

type MultiDragGestureRecognizer struct {
	GestureRecognizerBase

	// OnStart is called when a drag starts. It returns the Drag to report the
	// drag to, or nil to ignore it.
	//
	// Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.onStart
	OnStart GestureMultiDragStartCallback
	// contains filtered or unexported fields
}

MultiDragGestureRecognizer is the base of the recognizers that track several pointers, each as its own drag.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer

func (*MultiDragGestureRecognizer) AcceptGesture

func (r *MultiDragGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture starts the drag of the pointer.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.acceptGesture

func (*MultiDragGestureRecognizer) AddAllowedPointer

func (r *MultiDragGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer creates the state of the pointer and adds the recognizer to its arena.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.addAllowedPointer

func (*MultiDragGestureRecognizer) Dispose

func (r *MultiDragGestureRecognizer) Dispose()

Dispose ends the state of every pointer.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.dispose

func (*MultiDragGestureRecognizer) InitMultiDrag

InitMultiDrag sets up the recognizer; self is the recognizer that embeds it.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.new

func (*MultiDragGestureRecognizer) RejectGesture

func (r *MultiDragGestureRecognizer) RejectGesture(pointer int)

RejectGesture ends the state of the pointer.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.rejectGesture

type MultiDragGestureRecognizerOpts

type MultiDragGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed;
	// the default allows the primary button only.
	AllowedButtonsFilter AllowedButtonsFilter
	// Slop is how far a pointer moves before the drag starts (or, for a delayed
	// drag, before it is rejected), for every kind of pointer; none for
	// ComputeHitSlop of the kind.
	//
	// Deviation: Flutter has no such parameter: the slop is computeHitSlop (SPEC
	// §12.10).
	Slop foundation.Opt[float64]
}

MultiDragGestureRecognizerOpts are the optional parameters of the multi-drag recognizers.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.new

type MultiDragHooks

type MultiDragHooks interface {
	GestureRecognizerHooks
	// CreateNewPointerState makes the state of a pointer that went down.
	//
	// Flutter: gestures/multidrag.dart MultiDragGestureRecognizer.createNewPointerState
	CreateNewPointerState(event *PointerDownEvent) MultiDragPointerStateHooks
}

MultiDragHooks are the methods of a MultiDragGestureRecognizer that the subclass supplies.

Flutter: gestures/multidrag.dart MultiDragGestureRecognizer

type MultiDragPointerState

type MultiDragPointerState struct {

	// InitialPosition is where the pointer went down.
	//
	// Flutter: gestures/multidrag.dart MultiDragPointerState.initialPosition
	InitialPosition ui.Offset
	// Kind is the kind of device of the pointer.
	//
	// Flutter: gestures/multidrag.dart MultiDragPointerState.kind
	Kind ui.PointerDeviceKind
	// contains filtered or unexported fields
}

MultiDragPointerState is the state of one pointer of a MultiDragGestureRecognizer.

Flutter: gestures/multidrag.dart MultiDragPointerState

func (*MultiDragPointerState) Base

Base returns the state.

Flutter: gestures/multidrag.dart MultiDragPointerState.this

func (*MultiDragPointerState) CheckForResolutionAfterMove

func (s *MultiDragPointerState) CheckForResolutionAfterMove()

CheckForResolutionAfterMove does nothing.

Flutter: gestures/multidrag.dart MultiDragPointerState.checkForResolutionAfterMove

func (*MultiDragPointerState) Dispose

func (s *MultiDragPointerState) Dispose()

Dispose rejects the pointer if it is still in the arena.

Flutter: gestures/multidrag.dart MultiDragPointerState.dispose

func (*MultiDragPointerState) GestureSettings

GestureSettings are the gesture thresholds of the device.

Flutter: gestures/multidrag.dart MultiDragPointerState.gestureSettings

func (*MultiDragPointerState) HitSlop

func (s *MultiDragPointerState) HitSlop() float64

HitSlop is how far the pointer may move before the drag starts: the Slop of the recognizer, or ComputeHitSlop of the kind of the pointer.

Deviation: Flutter always uses computeHitSlop (SPEC §12.10).

Flutter: gestures/events.dart computeHitSlop

func (*MultiDragPointerState) InitMultiDragPointerState

func (s *MultiDragPointerState) InitMultiDragPointerState(clock SamplingClock, self MultiDragPointerStateHooks, initialPosition ui.Offset,
	kind ui.PointerDeviceKind, settings foundation.Opt[DeviceGestureSettings])

InitMultiDragPointerState sets up the state; self is the state that embeds it.

Flutter: gestures/multidrag.dart MultiDragPointerState.new

func (*MultiDragPointerState) PendingDelta

func (s *MultiDragPointerState) PendingDelta() foundation.Opt[ui.Offset]

PendingDelta is how far the pointer moved before the drag started; None once the state ended.

Flutter: gestures/multidrag.dart MultiDragPointerState.pendingDelta

func (*MultiDragPointerState) Rejected

func (s *MultiDragPointerState) Rejected()

Rejected forgets the pending delta.

Flutter: gestures/multidrag.dart MultiDragPointerState.rejected

func (*MultiDragPointerState) Resolve

func (s *MultiDragPointerState) Resolve(disposition GestureDisposition)

Resolve accepts or rejects the pointer in the arena.

Flutter: gestures/multidrag.dart MultiDragPointerState.resolve

type MultiDragPointerStateHooks

type MultiDragPointerStateHooks interface {
	// Base returns the embedded state.
	Base() *MultiDragPointerState
	// CheckForResolutionAfterMove is called after the pointer moved before the
	// drag is accepted; it resolves the arena when the state is decided.
	//
	// Flutter: gestures/multidrag.dart MultiDragPointerState.checkForResolutionAfterMove
	CheckForResolutionAfterMove()
	// Accepted is called when the recognizer wins the arena; it calls the
	// starter when the drag may start.
	//
	// Flutter: gestures/multidrag.dart MultiDragPointerState.accepted
	Accepted(starter GestureMultiDragStartCallback)
	// Rejected is called when the recognizer loses the arena.
	//
	// Flutter: gestures/multidrag.dart MultiDragPointerState.rejected
	Rejected()
	// Dispose releases the state.
	//
	// Flutter: gestures/multidrag.dart MultiDragPointerState.dispose
	Dispose()
}

MultiDragPointerStateHooks are the methods of a MultiDragPointerState that the subclass supplies.

Flutter: gestures/multidrag.dart MultiDragPointerState

type MultiTapGestureRecognizer

type MultiTapGestureRecognizer struct {
	GestureRecognizerBase

	// OnTapDown is called when a pointer that might tap touches the screen.
	//
	// Flutter: gestures/multitap.dart MultiTapGestureRecognizer.onTapDown
	OnTapDown GestureMultiTapDownCallback
	// OnTapUp is called when a pointer that tapped is lifted.
	//
	// Flutter: gestures/multitap.dart MultiTapGestureRecognizer.onTapUp
	OnTapUp GestureMultiTapUpCallback
	// OnTap is called after OnTapUp, when a pointer taps.
	//
	// Flutter: gestures/multitap.dart MultiTapGestureRecognizer.onTap
	OnTap GestureMultiTapCallback
	// OnTapCancel is called when a pointer that sent OnTapDown will not tap.
	//
	// Flutter: gestures/multitap.dart MultiTapGestureRecognizer.onTapCancel
	OnTapCancel GestureMultiTapCancelCallback
	// LongTapDelay is how long a pointer must stay down for OnLongTapDown.
	//
	// Flutter: gestures/multitap.dart MultiTapGestureRecognizer.longTapDelay
	LongTapDelay time.Duration
	// OnLongTapDown is called when a pointer stays down for LongTapDelay.
	//
	// Flutter: gestures/multitap.dart MultiTapGestureRecognizer.onLongTapDown
	OnLongTapDown GestureMultiTapDownCallback
	// contains filtered or unexported fields
}

MultiTapGestureRecognizer recognizes taps of several pointers at once, each on its own, without competing with the others.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer

func NewMultiTapGestureRecognizer

func NewMultiTapGestureRecognizer(binding *GestureBinding, opts ...MultiTapGestureRecognizerOpts) *MultiTapGestureRecognizer

NewMultiTapGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.new

func (*MultiTapGestureRecognizer) AcceptGesture

func (r *MultiTapGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture accepts the tap of the pointer.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.acceptGesture

func (*MultiTapGestureRecognizer) AddAllowedPointer

func (r *MultiTapGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer starts tracking the tap of the pointer.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.addAllowedPointer

func (*MultiTapGestureRecognizer) DebugDescription

func (r *MultiTapGestureRecognizer) DebugDescription() string

DebugDescription is "multitap".

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.debugDescription

func (*MultiTapGestureRecognizer) Dispose

func (r *MultiTapGestureRecognizer) Dispose()

Dispose cancels the taps.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.dispose

func (*MultiTapGestureRecognizer) RejectGesture

func (r *MultiTapGestureRecognizer) RejectGesture(pointer int)

RejectGesture rejects the tap of the pointer.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.rejectGesture

type MultiTapGestureRecognizerOpts

type MultiTapGestureRecognizerOpts struct {
	// LongTapDelay is how long a pointer must stay down for OnLongTapDown; 0
	// disables it.
	LongTapDelay time.Duration
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	AllowedButtonsFilter AllowedButtonsFilter
}

MultiTapGestureRecognizerOpts are the optional parameters of NewMultiTapGestureRecognizer.

Flutter: gestures/multitap.dart MultiTapGestureRecognizer.new

type MultitouchDragStrategy

type MultitouchDragStrategy int

MultitouchDragStrategy is how a drag follows several fingers.

Flutter: gestures/recognizer.dart MultitouchDragStrategy

const (
	// MultitouchDragStrategyUnspecified is the zero value: the default of the
	// platform (see DragGestureRecognizer).
	MultitouchDragStrategyUnspecified MultitouchDragStrategy = iota
	// MultitouchDragStrategyLatestPointer follows the most recent pointer.
	//
	// Flutter: gestures/recognizer.dart MultitouchDragStrategy.latestPointer
	MultitouchDragStrategyLatestPointer
	// MultitouchDragStrategyAverageBoundaryPointers follows the average of the
	// pointers that are farthest left, right, up and down.
	//
	// Flutter: gestures/recognizer.dart MultitouchDragStrategy.averageBoundaryPointers
	MultitouchDragStrategyAverageBoundaryPointers
	// MultitouchDragStrategySumAllPointers follows the sum of all the pointers.
	//
	// Flutter: gestures/recognizer.dart MultitouchDragStrategy.sumAllPointers
	MultitouchDragStrategySumAllPointers
)

func (MultitouchDragStrategy) Name

func (s MultitouchDragStrategy) Name() string

Name returns the Dart name of the strategy.

Flutter: gestures/recognizer.dart MultitouchDragStrategy

type NativeHitTestTarget

type NativeHitTestTarget interface {
	IsNativeHitTestTarget()
}

NativeHitTestTarget marks a HitTestTarget that stands for a native view: events over it belong to the platform, not to the framework. Implement IsNativeHitTestTarget to mark a target.

Flutter: gestures/hit_test.dart NativeHitTestTarget

type OffsetPair

type OffsetPair struct {
	// Local is the offset in local coordinates.
	Local ui.Offset
	// Global is the offset in global coordinates.
	Global ui.Offset
}

OffsetPair is a pair of offsets, the same point in the local and the global coordinates.

Flutter: gestures/recognizer.dart OffsetPair

func NewOffsetPairFromEventDelta

func NewOffsetPairFromEventDelta(event PointerEvent) OffsetPair

NewOffsetPairFromEventDelta is the delta of the event in both coordinates.

Flutter: gestures/recognizer.dart OffsetPair.fromEventDelta

func NewOffsetPairFromEventPosition

func NewOffsetPairFromEventPosition(event PointerEvent) OffsetPair

NewOffsetPairFromEventPosition is the position of the event in both coordinates.

Flutter: gestures/recognizer.dart OffsetPair.fromEventPosition

func (OffsetPair) Add

func (p OffsetPair) Add(other OffsetPair) OffsetPair

Add returns the sum of the pairs.

Flutter: gestures/recognizer.dart OffsetPair.operator+

func (OffsetPair) String

func (p OffsetPair) String() string

String describes the pair.

Flutter: gestures/recognizer.dart OffsetPair.toString

func (OffsetPair) Sub

func (p OffsetPair) Sub(other OffsetPair) OffsetPair

Sub returns the difference of the pairs.

Flutter: gestures/recognizer.dart OffsetPair.operator-

type OneSequenceGestureRecognizer

type OneSequenceGestureRecognizer struct {
	GestureRecognizerBase
	// contains filtered or unexported fields
}

OneSequenceGestureRecognizer is a recognizer that tracks pointers from their down event to their up event, and so takes part in the arena of each pointer.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer

func (*OneSequenceGestureRecognizer) AcceptGesture

func (r *OneSequenceGestureRecognizer) AcceptGesture(int)

AcceptGesture does nothing; a recognizer overrides it.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.acceptGesture

func (*OneSequenceGestureRecognizer) AddAllowedPointer

func (r *OneSequenceGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer starts tracking the pointer.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.addAllowedPointer

func (*OneSequenceGestureRecognizer) Dispose

func (r *OneSequenceGestureRecognizer) Dispose()

Dispose rejects the recognizer in its arenas and stops tracking its pointers.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.dispose

func (*OneSequenceGestureRecognizer) HandleNonAllowedPointer

func (r *OneSequenceGestureRecognizer) HandleNonAllowedPointer(*PointerDownEvent)

HandleNonAllowedPointer rejects the recognizer, so that it does not take part in the arena for the pointer.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.handleNonAllowedPointer

func (*OneSequenceGestureRecognizer) InitOneSequence

func (r *OneSequenceGestureRecognizer) InitOneSequence(binding *GestureBinding, self OneSequenceHooks, opts GestureRecognizerOpts)

InitOneSequence sets up the recognizer; self is the recognizer that embeds it.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.new

func (*OneSequenceGestureRecognizer) IsTrackingPointer

func (r *OneSequenceGestureRecognizer) IsTrackingPointer(pointer int) bool

IsTrackingPointer reports whether the recognizer tracks the pointer.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.isTrackingPointer

func (*OneSequenceGestureRecognizer) RejectGesture

func (r *OneSequenceGestureRecognizer) RejectGesture(int)

RejectGesture does nothing; a recognizer overrides it.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.rejectGesture

func (*OneSequenceGestureRecognizer) Resolve

func (r *OneSequenceGestureRecognizer) Resolve(disposition GestureDisposition)

Resolve accepts or rejects the recognizer in all the arenas it is in.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.resolve

func (*OneSequenceGestureRecognizer) ResolvePointer

func (r *OneSequenceGestureRecognizer) ResolvePointer(pointer int, disposition GestureDisposition)

ResolvePointer accepts or rejects the recognizer in the arena of the pointer.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.resolvePointer

func (*OneSequenceGestureRecognizer) SetTeam

SetTeam puts the recognizer in the team, which makes it join the team's combined member in each arena. It can be set once, before the recognizer tracks a pointer; otherwise a debug build panics with the tag RecognizerTeamSetTwice.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.team

func (*OneSequenceGestureRecognizer) StartTrackingPointer

func (r *OneSequenceGestureRecognizer) StartTrackingPointer(pointer int, transform *ui.Matrix4)

StartTrackingPointer routes the events of the pointer to HandleEvent and adds the recognizer to the arena of the pointer. The transform is applied to the events.

Deviation: it first forgets the entries of the arenas that have resolved. Flutter keeps them until the recognizer resolves or is disposed (flutter/flutter#117356), and with a new pointer id for every press that is an entry, an arena and its members for each press of a recognizer that lives as long as the app (SPEC §12.10).

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.startTrackingPointer

func (*OneSequenceGestureRecognizer) StopTrackingIfPointerNoLongerDown

func (r *OneSequenceGestureRecognizer) StopTrackingIfPointerNoLongerDown(event PointerEvent)

StopTrackingIfPointerNoLongerDown stops tracking the pointer if the event ends it: an up, cancel or pan/zoom end event.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.stopTrackingIfPointerNoLongerDown

func (*OneSequenceGestureRecognizer) StopTrackingPointer

func (r *OneSequenceGestureRecognizer) StopTrackingPointer(pointer int)

StopTrackingPointer stops the routing of the pointer's events. When it was the last tracked pointer, DidStopTrackingLastPointer is called.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.stopTrackingPointer

func (*OneSequenceGestureRecognizer) Team

Team is the team the recognizer is in, if any.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.team

func (*OneSequenceGestureRecognizer) TrackedPointerCount

func (r *OneSequenceGestureRecognizer) TrackedPointerCount() int

TrackedPointerCount is the number of pointers the recognizer tracks.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer._trackedPointers

type OneSequenceHooks

type OneSequenceHooks interface {
	GestureRecognizerHooks
	// HandleEvent is called with the events of the pointers the recognizer
	// tracks.
	//
	// Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.handleEvent
	HandleEvent(event PointerEvent)
	// DidStopTrackingLastPointer is called when the recognizer stops tracking
	// the last pointer.
	//
	// Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.didStopTrackingLastPointer
	DidStopTrackingLastPointer(pointer int)
	// StartTrackingPointer routes the events of the pointer to HandleEvent and
	// adds the recognizer to the arena of the pointer.
	//
	// Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.startTrackingPointer
	StartTrackingPointer(pointer int, transform *ui.Matrix4)
	// Resolve accepts or rejects the recognizer in the arenas it is in.
	//
	// Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.resolve
	Resolve(disposition GestureDisposition)
	// ResolvePointer accepts or rejects the recognizer in the arena of the
	// pointer.
	//
	// Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer.resolvePointer
	ResolvePointer(pointer int, disposition GestureDisposition)
}

OneSequenceHooks are the methods of a OneSequenceGestureRecognizer that the subclass supplies or may override.

Flutter: gestures/recognizer.dart OneSequenceGestureRecognizer

type PanGestureRecognizer

type PanGestureRecognizer struct{ DragGestureRecognizer }

PanGestureRecognizer recognizes movement in any direction.

Flutter: gestures/monodrag.dart PanGestureRecognizer

func NewPanGestureRecognizer

func NewPanGestureRecognizer(binding *GestureBinding, opts ...DragGestureRecognizerOpts) *PanGestureRecognizer

NewPanGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/monodrag.dart PanGestureRecognizer.new

type PointerAddedEvent

type PointerAddedEvent struct {
	// contains filtered or unexported fields
}

PointerAddedEvent is an event: the device has started tracking the pointer. For example, the pointer might be a touch that is about to start; for a mouse it means the mouse is in the window.

Flutter: gestures/events.dart PointerAddedEvent

func NewPointerAddedEvent

func NewPointerAddedEvent(opts ...PointerEventOpts) *PointerAddedEvent

NewPointerAddedEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerAddedEvent.new

func (*PointerAddedEvent) Buttons

func (d *PointerAddedEvent) Buttons() int

func (*PointerAddedEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerAddedEvent.copyWith

func (*PointerAddedEvent) DebugFillProperties

func (d *PointerAddedEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerAddedEvent) Delta

func (d *PointerAddedEvent) Delta() ui.Offset

func (*PointerAddedEvent) Device

func (d *PointerAddedEvent) Device() int

func (*PointerAddedEvent) Distance

func (d *PointerAddedEvent) Distance() float64

func (*PointerAddedEvent) DistanceMax

func (d *PointerAddedEvent) DistanceMax() float64

func (*PointerAddedEvent) DistanceMin

func (d *PointerAddedEvent) DistanceMin() float64

func (*PointerAddedEvent) Down

func (d *PointerAddedEvent) Down() bool

func (*PointerAddedEvent) EmbedderID

func (d *PointerAddedEvent) EmbedderID() int

func (*PointerAddedEvent) Kind

func (d *PointerAddedEvent) Kind() ui.PointerDeviceKind

func (*PointerAddedEvent) LocalDelta

func (d *PointerAddedEvent) LocalDelta() ui.Offset

func (*PointerAddedEvent) LocalPosition

func (d *PointerAddedEvent) LocalPosition() ui.Offset

func (*PointerAddedEvent) Obscured

func (d *PointerAddedEvent) Obscured() bool

func (*PointerAddedEvent) Orientation

func (d *PointerAddedEvent) Orientation() float64

func (*PointerAddedEvent) Original

func (d *PointerAddedEvent) Original() PointerEvent

func (*PointerAddedEvent) PlatformData

func (d *PointerAddedEvent) PlatformData() int

func (*PointerAddedEvent) Pointer

func (d *PointerAddedEvent) Pointer() int

func (*PointerAddedEvent) Position

func (d *PointerAddedEvent) Position() ui.Offset

func (*PointerAddedEvent) Pressure

func (d *PointerAddedEvent) Pressure() float64

func (*PointerAddedEvent) PressureMax

func (d *PointerAddedEvent) PressureMax() float64

func (*PointerAddedEvent) PressureMin

func (d *PointerAddedEvent) PressureMin() float64

func (*PointerAddedEvent) RadiusMajor

func (d *PointerAddedEvent) RadiusMajor() float64

func (*PointerAddedEvent) RadiusMax

func (d *PointerAddedEvent) RadiusMax() float64

func (*PointerAddedEvent) RadiusMin

func (d *PointerAddedEvent) RadiusMin() float64

func (*PointerAddedEvent) RadiusMinor

func (d *PointerAddedEvent) RadiusMinor() float64

func (*PointerAddedEvent) Respond

func (d *PointerAddedEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerAddedEvent) Size

func (d *PointerAddedEvent) Size() float64

func (*PointerAddedEvent) String

func (e *PointerAddedEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerAddedEvent.toString

func (*PointerAddedEvent) Synthesized

func (d *PointerAddedEvent) Synthesized() bool

func (*PointerAddedEvent) Tilt

func (d *PointerAddedEvent) Tilt() float64

func (*PointerAddedEvent) TimeStamp

func (d *PointerAddedEvent) TimeStamp() time.Duration

func (*PointerAddedEvent) Transform

func (d *PointerAddedEvent) Transform() *ui.Matrix4

func (*PointerAddedEvent) Transformed

func (e *PointerAddedEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerAddedEvent.transformed

func (*PointerAddedEvent) ViewID

func (d *PointerAddedEvent) ViewID() ui.ViewID

type PointerCancelEvent

type PointerCancelEvent struct {
	// contains filtered or unexported fields
}

PointerCancelEvent is an event: the input from the pointer is no longer directed towards this receiver.

Flutter: gestures/events.dart PointerCancelEvent

func NewPointerCancelEvent

func NewPointerCancelEvent(opts ...PointerEventOpts) *PointerCancelEvent

NewPointerCancelEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerCancelEvent.new

func (*PointerCancelEvent) Buttons

func (d *PointerCancelEvent) Buttons() int

func (*PointerCancelEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerCancelEvent.copyWith

func (*PointerCancelEvent) DebugFillProperties

func (d *PointerCancelEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerCancelEvent) Delta

func (d *PointerCancelEvent) Delta() ui.Offset

func (*PointerCancelEvent) Device

func (d *PointerCancelEvent) Device() int

func (*PointerCancelEvent) Distance

func (d *PointerCancelEvent) Distance() float64

func (*PointerCancelEvent) DistanceMax

func (d *PointerCancelEvent) DistanceMax() float64

func (*PointerCancelEvent) DistanceMin

func (d *PointerCancelEvent) DistanceMin() float64

func (*PointerCancelEvent) Down

func (d *PointerCancelEvent) Down() bool

func (*PointerCancelEvent) EmbedderID

func (d *PointerCancelEvent) EmbedderID() int

func (*PointerCancelEvent) Kind

func (d *PointerCancelEvent) Kind() ui.PointerDeviceKind

func (*PointerCancelEvent) LocalDelta

func (d *PointerCancelEvent) LocalDelta() ui.Offset

func (*PointerCancelEvent) LocalPosition

func (d *PointerCancelEvent) LocalPosition() ui.Offset

func (*PointerCancelEvent) Obscured

func (d *PointerCancelEvent) Obscured() bool

func (*PointerCancelEvent) Orientation

func (d *PointerCancelEvent) Orientation() float64

func (*PointerCancelEvent) Original

func (d *PointerCancelEvent) Original() PointerEvent

func (*PointerCancelEvent) PlatformData

func (d *PointerCancelEvent) PlatformData() int

func (*PointerCancelEvent) Pointer

func (d *PointerCancelEvent) Pointer() int

func (*PointerCancelEvent) Position

func (d *PointerCancelEvent) Position() ui.Offset

func (*PointerCancelEvent) Pressure

func (d *PointerCancelEvent) Pressure() float64

func (*PointerCancelEvent) PressureMax

func (d *PointerCancelEvent) PressureMax() float64

func (*PointerCancelEvent) PressureMin

func (d *PointerCancelEvent) PressureMin() float64

func (*PointerCancelEvent) RadiusMajor

func (d *PointerCancelEvent) RadiusMajor() float64

func (*PointerCancelEvent) RadiusMax

func (d *PointerCancelEvent) RadiusMax() float64

func (*PointerCancelEvent) RadiusMin

func (d *PointerCancelEvent) RadiusMin() float64

func (*PointerCancelEvent) RadiusMinor

func (d *PointerCancelEvent) RadiusMinor() float64

func (*PointerCancelEvent) Respond

func (d *PointerCancelEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerCancelEvent) Size

func (d *PointerCancelEvent) Size() float64

func (*PointerCancelEvent) String

func (e *PointerCancelEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerCancelEvent.toString

func (*PointerCancelEvent) Synthesized

func (d *PointerCancelEvent) Synthesized() bool

func (*PointerCancelEvent) Tilt

func (d *PointerCancelEvent) Tilt() float64

func (*PointerCancelEvent) TimeStamp

func (d *PointerCancelEvent) TimeStamp() time.Duration

func (*PointerCancelEvent) Transform

func (d *PointerCancelEvent) Transform() *ui.Matrix4

func (*PointerCancelEvent) Transformed

func (e *PointerCancelEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerCancelEvent.transformed

func (*PointerCancelEvent) ViewID

func (d *PointerCancelEvent) ViewID() ui.ViewID

type PointerDownEvent

type PointerDownEvent struct {
	// contains filtered or unexported fields
}

PointerDownEvent is an event: the pointer has made contact with the device. Its buttons default to PrimaryButton.

Flutter: gestures/events.dart PointerDownEvent

func NewPointerDownEvent

func NewPointerDownEvent(opts ...PointerEventOpts) *PointerDownEvent

NewPointerDownEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerDownEvent.new

func (*PointerDownEvent) Buttons

func (d *PointerDownEvent) Buttons() int

func (*PointerDownEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerDownEvent.copyWith

func (*PointerDownEvent) DebugFillProperties

func (d *PointerDownEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerDownEvent) Delta

func (d *PointerDownEvent) Delta() ui.Offset

func (*PointerDownEvent) Device

func (d *PointerDownEvent) Device() int

func (*PointerDownEvent) Distance

func (d *PointerDownEvent) Distance() float64

func (*PointerDownEvent) DistanceMax

func (d *PointerDownEvent) DistanceMax() float64

func (*PointerDownEvent) DistanceMin

func (d *PointerDownEvent) DistanceMin() float64

func (*PointerDownEvent) Down

func (d *PointerDownEvent) Down() bool

func (*PointerDownEvent) EmbedderID

func (d *PointerDownEvent) EmbedderID() int

func (*PointerDownEvent) Kind

func (d *PointerDownEvent) Kind() ui.PointerDeviceKind

func (*PointerDownEvent) LocalDelta

func (d *PointerDownEvent) LocalDelta() ui.Offset

func (*PointerDownEvent) LocalPosition

func (d *PointerDownEvent) LocalPosition() ui.Offset

func (*PointerDownEvent) Obscured

func (d *PointerDownEvent) Obscured() bool

func (*PointerDownEvent) Orientation

func (d *PointerDownEvent) Orientation() float64

func (*PointerDownEvent) Original

func (d *PointerDownEvent) Original() PointerEvent

func (*PointerDownEvent) PlatformData

func (d *PointerDownEvent) PlatformData() int

func (*PointerDownEvent) Pointer

func (d *PointerDownEvent) Pointer() int

func (*PointerDownEvent) Position

func (d *PointerDownEvent) Position() ui.Offset

func (*PointerDownEvent) Pressure

func (d *PointerDownEvent) Pressure() float64

func (*PointerDownEvent) PressureMax

func (d *PointerDownEvent) PressureMax() float64

func (*PointerDownEvent) PressureMin

func (d *PointerDownEvent) PressureMin() float64

func (*PointerDownEvent) RadiusMajor

func (d *PointerDownEvent) RadiusMajor() float64

func (*PointerDownEvent) RadiusMax

func (d *PointerDownEvent) RadiusMax() float64

func (*PointerDownEvent) RadiusMin

func (d *PointerDownEvent) RadiusMin() float64

func (*PointerDownEvent) RadiusMinor

func (d *PointerDownEvent) RadiusMinor() float64

func (*PointerDownEvent) Respond

func (d *PointerDownEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerDownEvent) Size

func (d *PointerDownEvent) Size() float64

func (*PointerDownEvent) String

func (e *PointerDownEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerDownEvent.toString

func (*PointerDownEvent) Synthesized

func (d *PointerDownEvent) Synthesized() bool

func (*PointerDownEvent) Tilt

func (d *PointerDownEvent) Tilt() float64

func (*PointerDownEvent) TimeStamp

func (d *PointerDownEvent) TimeStamp() time.Duration

func (*PointerDownEvent) Transform

func (d *PointerDownEvent) Transform() *ui.Matrix4

func (*PointerDownEvent) Transformed

func (e *PointerDownEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerDownEvent.transformed

func (*PointerDownEvent) ViewID

func (d *PointerDownEvent) ViewID() ui.ViewID

type PointerEnterEvent

type PointerEnterEvent struct {
	// contains filtered or unexported fields
}

PointerEnterEvent is an event: the pointer has moved with respect to the device while the pointer is or is not in contact with the device, and entered a target. It is made by the mouse tracker; a trackpad cannot make one.

Flutter: gestures/events.dart PointerEnterEvent

func NewPointerEnterEvent

func NewPointerEnterEvent(opts ...PointerEventOpts) *PointerEnterEvent

NewPointerEnterEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerEnterEvent.new

func NewPointerEnterEventFromMouseEvent

func NewPointerEnterEventFromMouseEvent(event PointerEvent) *PointerEnterEvent

NewPointerEnterEventFromMouseEvent creates the enter event that matches a hover or move event, with the same transform.

Flutter: gestures/events.dart PointerEnterEvent.fromMouseEvent

func (*PointerEnterEvent) Buttons

func (d *PointerEnterEvent) Buttons() int

func (*PointerEnterEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerEnterEvent.copyWith

func (*PointerEnterEvent) DebugFillProperties

func (d *PointerEnterEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerEnterEvent) Delta

func (d *PointerEnterEvent) Delta() ui.Offset

func (*PointerEnterEvent) Device

func (d *PointerEnterEvent) Device() int

func (*PointerEnterEvent) Distance

func (d *PointerEnterEvent) Distance() float64

func (*PointerEnterEvent) DistanceMax

func (d *PointerEnterEvent) DistanceMax() float64

func (*PointerEnterEvent) DistanceMin

func (d *PointerEnterEvent) DistanceMin() float64

func (*PointerEnterEvent) Down

func (d *PointerEnterEvent) Down() bool

func (*PointerEnterEvent) EmbedderID

func (d *PointerEnterEvent) EmbedderID() int

func (*PointerEnterEvent) Kind

func (d *PointerEnterEvent) Kind() ui.PointerDeviceKind

func (*PointerEnterEvent) LocalDelta

func (d *PointerEnterEvent) LocalDelta() ui.Offset

func (*PointerEnterEvent) LocalPosition

func (d *PointerEnterEvent) LocalPosition() ui.Offset

func (*PointerEnterEvent) Obscured

func (d *PointerEnterEvent) Obscured() bool

func (*PointerEnterEvent) Orientation

func (d *PointerEnterEvent) Orientation() float64

func (*PointerEnterEvent) Original

func (d *PointerEnterEvent) Original() PointerEvent

func (*PointerEnterEvent) PlatformData

func (d *PointerEnterEvent) PlatformData() int

func (*PointerEnterEvent) Pointer

func (d *PointerEnterEvent) Pointer() int

func (*PointerEnterEvent) Position

func (d *PointerEnterEvent) Position() ui.Offset

func (*PointerEnterEvent) Pressure

func (d *PointerEnterEvent) Pressure() float64

func (*PointerEnterEvent) PressureMax

func (d *PointerEnterEvent) PressureMax() float64

func (*PointerEnterEvent) PressureMin

func (d *PointerEnterEvent) PressureMin() float64

func (*PointerEnterEvent) RadiusMajor

func (d *PointerEnterEvent) RadiusMajor() float64

func (*PointerEnterEvent) RadiusMax

func (d *PointerEnterEvent) RadiusMax() float64

func (*PointerEnterEvent) RadiusMin

func (d *PointerEnterEvent) RadiusMin() float64

func (*PointerEnterEvent) RadiusMinor

func (d *PointerEnterEvent) RadiusMinor() float64

func (*PointerEnterEvent) Respond

func (d *PointerEnterEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerEnterEvent) Size

func (d *PointerEnterEvent) Size() float64

func (*PointerEnterEvent) String

func (e *PointerEnterEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerEnterEvent.toString

func (*PointerEnterEvent) Synthesized

func (d *PointerEnterEvent) Synthesized() bool

func (*PointerEnterEvent) Tilt

func (d *PointerEnterEvent) Tilt() float64

func (*PointerEnterEvent) TimeStamp

func (d *PointerEnterEvent) TimeStamp() time.Duration

func (*PointerEnterEvent) Transform

func (d *PointerEnterEvent) Transform() *ui.Matrix4

func (*PointerEnterEvent) Transformed

func (e *PointerEnterEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerEnterEvent.transformed

func (*PointerEnterEvent) ViewID

func (d *PointerEnterEvent) ViewID() ui.ViewID

type PointerEvent

type PointerEvent interface {
	foundation.Diagnosticable

	// ViewID is the ID of the view the event happened in.
	//
	// Flutter: gestures/events.dart PointerEvent.viewId
	ViewID() ui.ViewID
	// EmbedderID is the ID the embedder gave the pointer; it is 0 if it did
	// not.
	//
	// Flutter: gestures/events.dart PointerEvent.embedderId
	EmbedderID() int
	// TimeStamp is the time since the platform's start-up of the event.
	//
	// Flutter: gestures/events.dart PointerEvent.timeStamp
	TimeStamp() time.Duration
	// Pointer is the unique identifier of the pointer, from its down event to
	// its up or cancel event.
	//
	// Flutter: gestures/events.dart PointerEvent.pointer
	Pointer() int
	// Kind is the kind of device that made the event.
	//
	// Flutter: gestures/events.dart PointerEvent.kind
	Kind() ui.PointerDeviceKind
	// Device is the ID of the device; it is unique for a kind.
	//
	// Flutter: gestures/events.dart PointerEvent.device
	Device() int
	// Position is where the pointer is, in logical pixels of the view.
	//
	// Flutter: gestures/events.dart PointerEvent.position
	Position() ui.Offset
	// LocalPosition is Position in the coordinates of the target the event is
	// delivered to.
	//
	// Flutter: gestures/events.dart PointerEvent.localPosition
	LocalPosition() ui.Offset
	// Delta is how far the pointer moved since the last event, in the view's
	// coordinates.
	//
	// Flutter: gestures/events.dart PointerEvent.delta
	Delta() ui.Offset
	// LocalDelta is Delta in the coordinates of the target.
	//
	// Flutter: gestures/events.dart PointerEvent.localDelta
	LocalDelta() ui.Offset
	// Buttons is the set of buttons pressed, as the bits of PrimaryButton and
	// the constants beside it.
	//
	// Flutter: gestures/events.dart PointerEvent.buttons
	Buttons() int
	// Down reports whether the pointer is in contact with the device.
	//
	// Flutter: gestures/events.dart PointerEvent.down
	Down() bool
	// Obscured reports whether the input is obscured by another window.
	//
	// Flutter: gestures/events.dart PointerEvent.obscured
	Obscured() bool
	// Pressure is the pressure of the contact, between PressureMin and
	// PressureMax.
	//
	// Flutter: gestures/events.dart PointerEvent.pressure
	Pressure() float64
	// PressureMin is the minimum value Pressure can have.
	//
	// Flutter: gestures/events.dart PointerEvent.pressureMin
	PressureMin() float64
	// PressureMax is the maximum value Pressure can have.
	//
	// Flutter: gestures/events.dart PointerEvent.pressureMax
	PressureMax() float64
	// Distance is the distance of a hovering pointer from the screen.
	//
	// Flutter: gestures/events.dart PointerEvent.distance
	Distance() float64
	// DistanceMin is the minimum value Distance can have; it is always 0.
	//
	// Flutter: gestures/events.dart PointerEvent.distanceMin
	DistanceMin() float64
	// DistanceMax is the maximum value Distance can have.
	//
	// Flutter: gestures/events.dart PointerEvent.distanceMax
	DistanceMax() float64
	// Size is the area of the contact, normalized to the device.
	//
	// Flutter: gestures/events.dart PointerEvent.size
	Size() float64
	// RadiusMajor is the radius of the major axis of the contact ellipse.
	//
	// Flutter: gestures/events.dart PointerEvent.radiusMajor
	RadiusMajor() float64
	// RadiusMinor is the radius of the minor axis of the contact ellipse.
	//
	// Flutter: gestures/events.dart PointerEvent.radiusMinor
	RadiusMinor() float64
	// RadiusMin is the minimum value the radii can have.
	//
	// Flutter: gestures/events.dart PointerEvent.radiusMin
	RadiusMin() float64
	// RadiusMax is the maximum value the radii can have.
	//
	// Flutter: gestures/events.dart PointerEvent.radiusMax
	RadiusMax() float64
	// Orientation is the angle of the contact ellipse, in radians.
	//
	// Flutter: gestures/events.dart PointerEvent.orientation
	Orientation() float64
	// Tilt is the angle between the stylus and the surface normal, in radians.
	//
	// Flutter: gestures/events.dart PointerEvent.tilt
	Tilt() float64
	// PlatformData is opaque data from the platform.
	//
	// Flutter: gestures/events.dart PointerEvent.platformData
	PlatformData() int
	// Synthesized reports whether the event was made by the framework or the
	// engine, not by a device.
	//
	// Flutter: gestures/events.dart PointerEvent.synthesized
	Synthesized() bool
	// Transform is the matrix that took Position to LocalPosition; nil if the
	// event was not transformed.
	//
	// Flutter: gestures/events.dart PointerEvent.transform
	Transform() *ui.Matrix4
	// Original is the event this one was transformed from; nil if it is the
	// original.
	//
	// Flutter: gestures/events.dart PointerEvent.original
	Original() PointerEvent
	// Transformed returns the event with LocalPosition and LocalDelta in the
	// coordinates that transform leads to. Transforming a transformed event
	// starts from the original. A nil transform returns the original.
	//
	// Flutter: gestures/events.dart PointerEvent.transformed
	Transformed(transform *ui.Matrix4) PointerEvent
	// CopyWith returns an event of the same type with the given fields
	// replaced. As in Flutter, the copy has only the fields the event's
	// copyWith lists; the others get their defaults.
	//
	// Flutter: gestures/events.dart PointerEvent.copyWith
	CopyWith(c PointerEventCopyOpts) PointerEvent
	// String describes the event on one line.
	//
	// Flutter: gestures/events.dart PointerEvent.toString
	String() string
	// contains filtered or unexported methods
}

PointerEvent is the base of all pointer events: a report of where a pointer is and what it does. Pointer events are immutable. Each concrete event is a pointer to a struct named after Flutter's class (*PointerDownEvent, ...); use a type switch where Dart uses is.

An event has a position in the coordinates of its view (Position) and one in the coordinates of the target it is delivered to (LocalPosition). Transformed makes the second kind from the first.

Deviation: Flutter has a class per event and constructor parameters that differ per class; Glutter shares one options struct, PointerEventOpts, and a constructor ignores the fields its Flutter counterpart does not have (SPEC §12.10).

Flutter: gestures/events.dart PointerEvent

func PointerEventConverterExpand

func PointerEventConverterExpand(data []ui.PointerData, devicePixelRatioForView DevicePixelRatioGetter) []PointerEvent

PointerEventConverterExpand converts the pointer data of the engine, which is in physical pixels, to pointer events in logical pixels. Data of a view that does not exist, data of an unknown kind of signal and a scroll with a delta that is not finite are dropped.

Flutter: gestures/converter.dart PointerEventConverter.expand

type PointerEventCopyOpts

type PointerEventCopyOpts struct {
	// ViewID replaces the view.
	ViewID foundation.Opt[ui.ViewID]
	// TimeStamp replaces the time.
	TimeStamp foundation.Opt[time.Duration]
	// Pointer replaces the pointer ID.
	Pointer foundation.Opt[int]
	// Kind replaces the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
	// Device replaces the device ID.
	Device foundation.Opt[int]
	// Position replaces the position.
	Position foundation.Opt[ui.Offset]
	// Delta replaces the delta.
	Delta foundation.Opt[ui.Offset]
	// Buttons replaces the buttons.
	Buttons foundation.Opt[int]
	// Obscured replaces the obscured flag.
	Obscured foundation.Opt[bool]
	// Pressure replaces the pressure.
	Pressure foundation.Opt[float64]
	// PressureMin replaces the least pressure.
	PressureMin foundation.Opt[float64]
	// PressureMax replaces the greatest pressure.
	PressureMax foundation.Opt[float64]
	// Distance replaces the distance.
	Distance foundation.Opt[float64]
	// DistanceMax replaces the greatest distance.
	DistanceMax foundation.Opt[float64]
	// Size replaces the size.
	Size foundation.Opt[float64]
	// RadiusMajor replaces the major radius.
	RadiusMajor foundation.Opt[float64]
	// RadiusMinor replaces the minor radius.
	RadiusMinor foundation.Opt[float64]
	// RadiusMin replaces the least radius.
	RadiusMin foundation.Opt[float64]
	// RadiusMax replaces the greatest radius.
	RadiusMax foundation.Opt[float64]
	// Orientation replaces the orientation.
	Orientation foundation.Opt[float64]
	// Tilt replaces the tilt.
	Tilt foundation.Opt[float64]
	// Synthesized replaces the synthesized flag.
	Synthesized foundation.Opt[bool]
	// EmbedderID replaces the embedder's ID.
	EmbedderID foundation.Opt[int]
	// OnRespond replaces the callback of a scroll event; the default is the
	// event's own Respond.
	OnRespond func(allowPlatformDefault bool)
}

PointerEventCopyOpts are the replacements CopyWith takes. A field that is None keeps the event's own value.

Flutter: gestures/events.dart PointerEvent.copyWith

type PointerEventOpts

type PointerEventOpts struct {
	// ViewID is the view of the event; the default is 0.
	ViewID ui.ViewID
	// EmbedderID is the ID the embedder gave the pointer.
	EmbedderID int
	// TimeStamp is the time of the event.
	TimeStamp time.Duration
	// Pointer is the ID of the pointer.
	Pointer int
	// Kind is the kind of device; the default is touch (mouse for the signal
	// events, trackpad for the pan/zoom events).
	Kind ui.PointerDeviceKind
	// Device is the ID of the device.
	Device int
	// Position is where the pointer is.
	Position ui.Offset
	// Delta is how far the pointer moved.
	Delta ui.Offset
	// Buttons are the buttons pressed; the default is PrimaryButton for a
	// down and a move event, and 0 for the others.
	Buttons foundation.Opt[int]
	// Down is whether the pointer is in contact; only enter and exit events
	// take it.
	Down bool
	// Obscured is whether the input is obscured.
	Obscured bool
	// Pressure is the pressure; the default is 1 for a down and a move event,
	// and 0 for an up event.
	Pressure foundation.Opt[float64]
	// PressureMin is the least pressure; the default is 1.
	PressureMin foundation.Opt[float64]
	// PressureMax is the greatest pressure; the default is 1.
	PressureMax foundation.Opt[float64]
	// Distance is the distance from the screen.
	Distance float64
	// DistanceMax is the greatest distance.
	DistanceMax float64
	// Size is the area of the contact.
	Size float64
	// RadiusMajor is the major radius of the contact.
	RadiusMajor float64
	// RadiusMinor is the minor radius of the contact.
	RadiusMinor float64
	// RadiusMin is the least radius.
	RadiusMin float64
	// RadiusMax is the greatest radius.
	RadiusMax float64
	// Orientation is the angle of the contact.
	Orientation float64
	// Tilt is the tilt of the stylus.
	Tilt float64
	// PlatformData is opaque data from the platform.
	PlatformData int
	// Synthesized is whether the framework or the engine made the event.
	Synthesized bool
	// ScrollDelta is how far a scroll event scrolls, in logical pixels.
	ScrollDelta ui.Offset
	// Scale is the scale of a scale or a pan/zoom update event; the default
	// is 1.
	Scale foundation.Opt[float64]
	// Pan is the pan of a pan/zoom update event, from where it started.
	Pan ui.Offset
	// PanDelta is the change of Pan since the last pan/zoom update event.
	PanDelta ui.Offset
	// Rotation is the rotation of a pan/zoom update event, in radians.
	Rotation float64
	// OnRespond is called by a scroll event's Respond.
	OnRespond func(allowPlatformDefault bool)
}

PointerEventOpts are the optional parameters of the constructors of the events. A constructor reads the fields that the Flutter constructor of the same event has, and ignores the others.

Flutter: gestures/events.dart PointerEvent.new

type PointerEventResampler

type PointerEventResampler struct {
	// contains filtered or unexported fields
}

PointerEventResampler resamples the events of one touch device to the times the app wants to see them (the frame times): it interpolates the position between the events, and holds up and removed events until their time comes.

Flutter: gestures/resampler.dart PointerEventResampler

func NewPointerEventResampler

func NewPointerEventResampler() *PointerEventResampler

NewPointerEventResampler creates a resampler without events.

Flutter: gestures/resampler.dart PointerEventResampler.new

func (*PointerEventResampler) AddEvent

func (r *PointerEventResampler) AddEvent(event PointerEvent)

AddEvent queues an event to be resampled.

Flutter: gestures/resampler.dart PointerEventResampler.addEvent

func (*PointerEventResampler) HasPendingEvents

func (r *PointerEventResampler) HasPendingEvents() bool

HasPendingEvents reports whether events are queued.

Flutter: gestures/resampler.dart PointerEventResampler.hasPendingEvents

func (*PointerEventResampler) IsDown

func (r *PointerEventResampler) IsDown() bool

IsDown reports whether the pointer is down.

Flutter: gestures/resampler.dart PointerEventResampler.isDown

func (*PointerEventResampler) IsTracked

func (r *PointerEventResampler) IsTracked() bool

IsTracked reports whether the pointer is tracked: added and not removed.

Flutter: gestures/resampler.dart PointerEventResampler.isTracked

func (*PointerEventResampler) Sample

func (r *PointerEventResampler) Sample(sampleTime, nextSampleTime time.Duration, callback HandleEventCallback)

Sample calls callback with the events at sampleTime. Events that fall between sampleTime and nextSampleTime that can't be interpolated, such as an up event, are handled together with it.

Flutter: gestures/resampler.dart PointerEventResampler.sample

func (*PointerEventResampler) Stop

func (r *PointerEventResampler) Stop(callback HandleEventCallback)

Stop calls callback with all the queued events, as they are, and resets the resampler.

Flutter: gestures/resampler.dart PointerEventResampler.stop

type PointerExitEvent

type PointerExitEvent struct {
	// contains filtered or unexported fields
}

PointerExitEvent is an event: the pointer has moved with respect to the device while the pointer is or is not in contact with the device, and exited a target. It is made by the mouse tracker; a trackpad cannot make one.

Flutter: gestures/events.dart PointerExitEvent

func NewPointerExitEvent

func NewPointerExitEvent(opts ...PointerEventOpts) *PointerExitEvent

NewPointerExitEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerExitEvent.new

func NewPointerExitEventFromMouseEvent

func NewPointerExitEventFromMouseEvent(event PointerEvent) *PointerExitEvent

NewPointerExitEventFromMouseEvent creates the exit event that matches a hover or move event, with the same transform.

Flutter: gestures/events.dart PointerExitEvent.fromMouseEvent

func (*PointerExitEvent) Buttons

func (d *PointerExitEvent) Buttons() int

func (*PointerExitEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerExitEvent.copyWith

func (*PointerExitEvent) DebugFillProperties

func (d *PointerExitEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerExitEvent) Delta

func (d *PointerExitEvent) Delta() ui.Offset

func (*PointerExitEvent) Device

func (d *PointerExitEvent) Device() int

func (*PointerExitEvent) Distance

func (d *PointerExitEvent) Distance() float64

func (*PointerExitEvent) DistanceMax

func (d *PointerExitEvent) DistanceMax() float64

func (*PointerExitEvent) DistanceMin

func (d *PointerExitEvent) DistanceMin() float64

func (*PointerExitEvent) Down

func (d *PointerExitEvent) Down() bool

func (*PointerExitEvent) EmbedderID

func (d *PointerExitEvent) EmbedderID() int

func (*PointerExitEvent) Kind

func (d *PointerExitEvent) Kind() ui.PointerDeviceKind

func (*PointerExitEvent) LocalDelta

func (d *PointerExitEvent) LocalDelta() ui.Offset

func (*PointerExitEvent) LocalPosition

func (d *PointerExitEvent) LocalPosition() ui.Offset

func (*PointerExitEvent) Obscured

func (d *PointerExitEvent) Obscured() bool

func (*PointerExitEvent) Orientation

func (d *PointerExitEvent) Orientation() float64

func (*PointerExitEvent) Original

func (d *PointerExitEvent) Original() PointerEvent

func (*PointerExitEvent) PlatformData

func (d *PointerExitEvent) PlatformData() int

func (*PointerExitEvent) Pointer

func (d *PointerExitEvent) Pointer() int

func (*PointerExitEvent) Position

func (d *PointerExitEvent) Position() ui.Offset

func (*PointerExitEvent) Pressure

func (d *PointerExitEvent) Pressure() float64

func (*PointerExitEvent) PressureMax

func (d *PointerExitEvent) PressureMax() float64

func (*PointerExitEvent) PressureMin

func (d *PointerExitEvent) PressureMin() float64

func (*PointerExitEvent) RadiusMajor

func (d *PointerExitEvent) RadiusMajor() float64

func (*PointerExitEvent) RadiusMax

func (d *PointerExitEvent) RadiusMax() float64

func (*PointerExitEvent) RadiusMin

func (d *PointerExitEvent) RadiusMin() float64

func (*PointerExitEvent) RadiusMinor

func (d *PointerExitEvent) RadiusMinor() float64

func (*PointerExitEvent) Respond

func (d *PointerExitEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerExitEvent) Size

func (d *PointerExitEvent) Size() float64

func (*PointerExitEvent) String

func (e *PointerExitEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerExitEvent.toString

func (*PointerExitEvent) Synthesized

func (d *PointerExitEvent) Synthesized() bool

func (*PointerExitEvent) Tilt

func (d *PointerExitEvent) Tilt() float64

func (*PointerExitEvent) TimeStamp

func (d *PointerExitEvent) TimeStamp() time.Duration

func (*PointerExitEvent) Transform

func (d *PointerExitEvent) Transform() *ui.Matrix4

func (*PointerExitEvent) Transformed

func (e *PointerExitEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerExitEvent.transformed

func (*PointerExitEvent) ViewID

func (d *PointerExitEvent) ViewID() ui.ViewID

type PointerHoverEvent

type PointerHoverEvent struct {
	// contains filtered or unexported fields
}

PointerHoverEvent is an event: the pointer has moved with respect to the device while the pointer is not in contact with the device.

Flutter: gestures/events.dart PointerHoverEvent

func NewPointerHoverEvent

func NewPointerHoverEvent(opts ...PointerEventOpts) *PointerHoverEvent

NewPointerHoverEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerHoverEvent.new

func (*PointerHoverEvent) Buttons

func (d *PointerHoverEvent) Buttons() int

func (*PointerHoverEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerHoverEvent.copyWith

func (*PointerHoverEvent) DebugFillProperties

func (d *PointerHoverEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerHoverEvent) Delta

func (d *PointerHoverEvent) Delta() ui.Offset

func (*PointerHoverEvent) Device

func (d *PointerHoverEvent) Device() int

func (*PointerHoverEvent) Distance

func (d *PointerHoverEvent) Distance() float64

func (*PointerHoverEvent) DistanceMax

func (d *PointerHoverEvent) DistanceMax() float64

func (*PointerHoverEvent) DistanceMin

func (d *PointerHoverEvent) DistanceMin() float64

func (*PointerHoverEvent) Down

func (d *PointerHoverEvent) Down() bool

func (*PointerHoverEvent) EmbedderID

func (d *PointerHoverEvent) EmbedderID() int

func (*PointerHoverEvent) Kind

func (d *PointerHoverEvent) Kind() ui.PointerDeviceKind

func (*PointerHoverEvent) LocalDelta

func (d *PointerHoverEvent) LocalDelta() ui.Offset

func (*PointerHoverEvent) LocalPosition

func (d *PointerHoverEvent) LocalPosition() ui.Offset

func (*PointerHoverEvent) Obscured

func (d *PointerHoverEvent) Obscured() bool

func (*PointerHoverEvent) Orientation

func (d *PointerHoverEvent) Orientation() float64

func (*PointerHoverEvent) Original

func (d *PointerHoverEvent) Original() PointerEvent

func (*PointerHoverEvent) PlatformData

func (d *PointerHoverEvent) PlatformData() int

func (*PointerHoverEvent) Pointer

func (d *PointerHoverEvent) Pointer() int

func (*PointerHoverEvent) Position

func (d *PointerHoverEvent) Position() ui.Offset

func (*PointerHoverEvent) Pressure

func (d *PointerHoverEvent) Pressure() float64

func (*PointerHoverEvent) PressureMax

func (d *PointerHoverEvent) PressureMax() float64

func (*PointerHoverEvent) PressureMin

func (d *PointerHoverEvent) PressureMin() float64

func (*PointerHoverEvent) RadiusMajor

func (d *PointerHoverEvent) RadiusMajor() float64

func (*PointerHoverEvent) RadiusMax

func (d *PointerHoverEvent) RadiusMax() float64

func (*PointerHoverEvent) RadiusMin

func (d *PointerHoverEvent) RadiusMin() float64

func (*PointerHoverEvent) RadiusMinor

func (d *PointerHoverEvent) RadiusMinor() float64

func (*PointerHoverEvent) Respond

func (d *PointerHoverEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerHoverEvent) Size

func (d *PointerHoverEvent) Size() float64

func (*PointerHoverEvent) String

func (e *PointerHoverEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerHoverEvent.toString

func (*PointerHoverEvent) Synthesized

func (d *PointerHoverEvent) Synthesized() bool

func (*PointerHoverEvent) Tilt

func (d *PointerHoverEvent) Tilt() float64

func (*PointerHoverEvent) TimeStamp

func (d *PointerHoverEvent) TimeStamp() time.Duration

func (*PointerHoverEvent) Transform

func (d *PointerHoverEvent) Transform() *ui.Matrix4

func (*PointerHoverEvent) Transformed

func (e *PointerHoverEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerHoverEvent.transformed

func (*PointerHoverEvent) ViewID

func (d *PointerHoverEvent) ViewID() ui.ViewID

type PointerMoveEvent

type PointerMoveEvent struct {
	// contains filtered or unexported fields
}

PointerMoveEvent is an event: the pointer has moved with respect to the device while the pointer is in contact with the device. Its buttons default to PrimaryButton.

Flutter: gestures/events.dart PointerMoveEvent

func NewPointerMoveEvent

func NewPointerMoveEvent(opts ...PointerEventOpts) *PointerMoveEvent

NewPointerMoveEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerMoveEvent.new

func (*PointerMoveEvent) Buttons

func (d *PointerMoveEvent) Buttons() int

func (*PointerMoveEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerMoveEvent.copyWith

func (*PointerMoveEvent) DebugFillProperties

func (d *PointerMoveEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerMoveEvent) Delta

func (d *PointerMoveEvent) Delta() ui.Offset

func (*PointerMoveEvent) Device

func (d *PointerMoveEvent) Device() int

func (*PointerMoveEvent) Distance

func (d *PointerMoveEvent) Distance() float64

func (*PointerMoveEvent) DistanceMax

func (d *PointerMoveEvent) DistanceMax() float64

func (*PointerMoveEvent) DistanceMin

func (d *PointerMoveEvent) DistanceMin() float64

func (*PointerMoveEvent) Down

func (d *PointerMoveEvent) Down() bool

func (*PointerMoveEvent) EmbedderID

func (d *PointerMoveEvent) EmbedderID() int

func (*PointerMoveEvent) Kind

func (d *PointerMoveEvent) Kind() ui.PointerDeviceKind

func (*PointerMoveEvent) LocalDelta

func (d *PointerMoveEvent) LocalDelta() ui.Offset

func (*PointerMoveEvent) LocalPosition

func (d *PointerMoveEvent) LocalPosition() ui.Offset

func (*PointerMoveEvent) Obscured

func (d *PointerMoveEvent) Obscured() bool

func (*PointerMoveEvent) Orientation

func (d *PointerMoveEvent) Orientation() float64

func (*PointerMoveEvent) Original

func (d *PointerMoveEvent) Original() PointerEvent

func (*PointerMoveEvent) PlatformData

func (d *PointerMoveEvent) PlatformData() int

func (*PointerMoveEvent) Pointer

func (d *PointerMoveEvent) Pointer() int

func (*PointerMoveEvent) Position

func (d *PointerMoveEvent) Position() ui.Offset

func (*PointerMoveEvent) Pressure

func (d *PointerMoveEvent) Pressure() float64

func (*PointerMoveEvent) PressureMax

func (d *PointerMoveEvent) PressureMax() float64

func (*PointerMoveEvent) PressureMin

func (d *PointerMoveEvent) PressureMin() float64

func (*PointerMoveEvent) RadiusMajor

func (d *PointerMoveEvent) RadiusMajor() float64

func (*PointerMoveEvent) RadiusMax

func (d *PointerMoveEvent) RadiusMax() float64

func (*PointerMoveEvent) RadiusMin

func (d *PointerMoveEvent) RadiusMin() float64

func (*PointerMoveEvent) RadiusMinor

func (d *PointerMoveEvent) RadiusMinor() float64

func (*PointerMoveEvent) Respond

func (d *PointerMoveEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerMoveEvent) Size

func (d *PointerMoveEvent) Size() float64

func (*PointerMoveEvent) String

func (e *PointerMoveEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerMoveEvent.toString

func (*PointerMoveEvent) Synthesized

func (d *PointerMoveEvent) Synthesized() bool

func (*PointerMoveEvent) Tilt

func (d *PointerMoveEvent) Tilt() float64

func (*PointerMoveEvent) TimeStamp

func (d *PointerMoveEvent) TimeStamp() time.Duration

func (*PointerMoveEvent) Transform

func (d *PointerMoveEvent) Transform() *ui.Matrix4

func (*PointerMoveEvent) Transformed

func (e *PointerMoveEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerMoveEvent.transformed

func (*PointerMoveEvent) ViewID

func (d *PointerMoveEvent) ViewID() ui.ViewID

type PointerPanZoomEndEvent

type PointerPanZoomEndEvent struct {
	// contains filtered or unexported fields
}

PointerPanZoomEndEvent is an event: a pan/zoom gesture of a trackpad has ended.

Flutter: gestures/events.dart PointerPanZoomEndEvent

func NewPointerPanZoomEndEvent

func NewPointerPanZoomEndEvent(opts ...PointerEventOpts) *PointerPanZoomEndEvent

NewPointerPanZoomEndEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerPanZoomEndEvent.new

func (*PointerPanZoomEndEvent) Buttons

func (d *PointerPanZoomEndEvent) Buttons() int

func (*PointerPanZoomEndEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerPanZoomEndEvent.copyWith

func (*PointerPanZoomEndEvent) DebugFillProperties

func (d *PointerPanZoomEndEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerPanZoomEndEvent) Delta

func (d *PointerPanZoomEndEvent) Delta() ui.Offset

func (*PointerPanZoomEndEvent) Device

func (d *PointerPanZoomEndEvent) Device() int

func (*PointerPanZoomEndEvent) Distance

func (d *PointerPanZoomEndEvent) Distance() float64

func (*PointerPanZoomEndEvent) DistanceMax

func (d *PointerPanZoomEndEvent) DistanceMax() float64

func (*PointerPanZoomEndEvent) DistanceMin

func (d *PointerPanZoomEndEvent) DistanceMin() float64

func (*PointerPanZoomEndEvent) Down

func (d *PointerPanZoomEndEvent) Down() bool

func (*PointerPanZoomEndEvent) EmbedderID

func (d *PointerPanZoomEndEvent) EmbedderID() int

func (*PointerPanZoomEndEvent) Kind

func (d *PointerPanZoomEndEvent) Kind() ui.PointerDeviceKind

func (*PointerPanZoomEndEvent) LocalDelta

func (d *PointerPanZoomEndEvent) LocalDelta() ui.Offset

func (*PointerPanZoomEndEvent) LocalPosition

func (d *PointerPanZoomEndEvent) LocalPosition() ui.Offset

func (*PointerPanZoomEndEvent) Obscured

func (d *PointerPanZoomEndEvent) Obscured() bool

func (*PointerPanZoomEndEvent) Orientation

func (d *PointerPanZoomEndEvent) Orientation() float64

func (*PointerPanZoomEndEvent) Original

func (d *PointerPanZoomEndEvent) Original() PointerEvent

func (*PointerPanZoomEndEvent) PlatformData

func (d *PointerPanZoomEndEvent) PlatformData() int

func (*PointerPanZoomEndEvent) Pointer

func (d *PointerPanZoomEndEvent) Pointer() int

func (*PointerPanZoomEndEvent) Position

func (d *PointerPanZoomEndEvent) Position() ui.Offset

func (*PointerPanZoomEndEvent) Pressure

func (d *PointerPanZoomEndEvent) Pressure() float64

func (*PointerPanZoomEndEvent) PressureMax

func (d *PointerPanZoomEndEvent) PressureMax() float64

func (*PointerPanZoomEndEvent) PressureMin

func (d *PointerPanZoomEndEvent) PressureMin() float64

func (*PointerPanZoomEndEvent) RadiusMajor

func (d *PointerPanZoomEndEvent) RadiusMajor() float64

func (*PointerPanZoomEndEvent) RadiusMax

func (d *PointerPanZoomEndEvent) RadiusMax() float64

func (*PointerPanZoomEndEvent) RadiusMin

func (d *PointerPanZoomEndEvent) RadiusMin() float64

func (*PointerPanZoomEndEvent) RadiusMinor

func (d *PointerPanZoomEndEvent) RadiusMinor() float64

func (*PointerPanZoomEndEvent) Respond

func (d *PointerPanZoomEndEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerPanZoomEndEvent) Size

func (d *PointerPanZoomEndEvent) Size() float64

func (*PointerPanZoomEndEvent) String

func (e *PointerPanZoomEndEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerPanZoomEndEvent.toString

func (*PointerPanZoomEndEvent) Synthesized

func (d *PointerPanZoomEndEvent) Synthesized() bool

func (*PointerPanZoomEndEvent) Tilt

func (d *PointerPanZoomEndEvent) Tilt() float64

func (*PointerPanZoomEndEvent) TimeStamp

func (d *PointerPanZoomEndEvent) TimeStamp() time.Duration

func (*PointerPanZoomEndEvent) Transform

func (d *PointerPanZoomEndEvent) Transform() *ui.Matrix4

func (*PointerPanZoomEndEvent) Transformed

func (e *PointerPanZoomEndEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerPanZoomEndEvent.transformed

func (*PointerPanZoomEndEvent) ViewID

func (d *PointerPanZoomEndEvent) ViewID() ui.ViewID

type PointerPanZoomStartEvent

type PointerPanZoomStartEvent struct {
	// contains filtered or unexported fields
}

PointerPanZoomStartEvent is an event: a pan/zoom gesture of a trackpad has started.

Flutter: gestures/events.dart PointerPanZoomStartEvent

func NewPointerPanZoomStartEvent

func NewPointerPanZoomStartEvent(opts ...PointerEventOpts) *PointerPanZoomStartEvent

NewPointerPanZoomStartEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerPanZoomStartEvent.new

func (*PointerPanZoomStartEvent) Buttons

func (d *PointerPanZoomStartEvent) Buttons() int

func (*PointerPanZoomStartEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerPanZoomStartEvent.copyWith

func (*PointerPanZoomStartEvent) DebugFillProperties

func (d *PointerPanZoomStartEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerPanZoomStartEvent) Delta

func (d *PointerPanZoomStartEvent) Delta() ui.Offset

func (*PointerPanZoomStartEvent) Device

func (d *PointerPanZoomStartEvent) Device() int

func (*PointerPanZoomStartEvent) Distance

func (d *PointerPanZoomStartEvent) Distance() float64

func (*PointerPanZoomStartEvent) DistanceMax

func (d *PointerPanZoomStartEvent) DistanceMax() float64

func (*PointerPanZoomStartEvent) DistanceMin

func (d *PointerPanZoomStartEvent) DistanceMin() float64

func (*PointerPanZoomStartEvent) Down

func (d *PointerPanZoomStartEvent) Down() bool

func (*PointerPanZoomStartEvent) EmbedderID

func (d *PointerPanZoomStartEvent) EmbedderID() int

func (*PointerPanZoomStartEvent) Kind

func (d *PointerPanZoomStartEvent) Kind() ui.PointerDeviceKind

func (*PointerPanZoomStartEvent) LocalDelta

func (d *PointerPanZoomStartEvent) LocalDelta() ui.Offset

func (*PointerPanZoomStartEvent) LocalPosition

func (d *PointerPanZoomStartEvent) LocalPosition() ui.Offset

func (*PointerPanZoomStartEvent) Obscured

func (d *PointerPanZoomStartEvent) Obscured() bool

func (*PointerPanZoomStartEvent) Orientation

func (d *PointerPanZoomStartEvent) Orientation() float64

func (*PointerPanZoomStartEvent) Original

func (d *PointerPanZoomStartEvent) Original() PointerEvent

func (*PointerPanZoomStartEvent) PlatformData

func (d *PointerPanZoomStartEvent) PlatformData() int

func (*PointerPanZoomStartEvent) Pointer

func (d *PointerPanZoomStartEvent) Pointer() int

func (*PointerPanZoomStartEvent) Position

func (d *PointerPanZoomStartEvent) Position() ui.Offset

func (*PointerPanZoomStartEvent) Pressure

func (d *PointerPanZoomStartEvent) Pressure() float64

func (*PointerPanZoomStartEvent) PressureMax

func (d *PointerPanZoomStartEvent) PressureMax() float64

func (*PointerPanZoomStartEvent) PressureMin

func (d *PointerPanZoomStartEvent) PressureMin() float64

func (*PointerPanZoomStartEvent) RadiusMajor

func (d *PointerPanZoomStartEvent) RadiusMajor() float64

func (*PointerPanZoomStartEvent) RadiusMax

func (d *PointerPanZoomStartEvent) RadiusMax() float64

func (*PointerPanZoomStartEvent) RadiusMin

func (d *PointerPanZoomStartEvent) RadiusMin() float64

func (*PointerPanZoomStartEvent) RadiusMinor

func (d *PointerPanZoomStartEvent) RadiusMinor() float64

func (*PointerPanZoomStartEvent) Respond

func (d *PointerPanZoomStartEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerPanZoomStartEvent) Size

func (d *PointerPanZoomStartEvent) Size() float64

func (*PointerPanZoomStartEvent) String

func (e *PointerPanZoomStartEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerPanZoomStartEvent.toString

func (*PointerPanZoomStartEvent) Synthesized

func (d *PointerPanZoomStartEvent) Synthesized() bool

func (*PointerPanZoomStartEvent) Tilt

func (d *PointerPanZoomStartEvent) Tilt() float64

func (*PointerPanZoomStartEvent) TimeStamp

func (d *PointerPanZoomStartEvent) TimeStamp() time.Duration

func (*PointerPanZoomStartEvent) Transform

func (d *PointerPanZoomStartEvent) Transform() *ui.Matrix4

func (*PointerPanZoomStartEvent) Transformed

func (e *PointerPanZoomStartEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerPanZoomStartEvent.transformed

func (*PointerPanZoomStartEvent) ViewID

func (d *PointerPanZoomStartEvent) ViewID() ui.ViewID

type PointerPanZoomUpdateEvent

type PointerPanZoomUpdateEvent struct {
	// contains filtered or unexported fields
}

PointerPanZoomUpdateEvent is an event: a pan/zoom gesture of a trackpad has changed. Pan, Scale and Rotation are the totals since it started, and PanDelta is the change of Pan since the last update.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent

func NewPointerPanZoomUpdateEvent

func NewPointerPanZoomUpdateEvent(opts ...PointerEventOpts) *PointerPanZoomUpdateEvent

NewPointerPanZoomUpdateEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.new

func (*PointerPanZoomUpdateEvent) Buttons

func (d *PointerPanZoomUpdateEvent) Buttons() int

func (*PointerPanZoomUpdateEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.copyWith

func (*PointerPanZoomUpdateEvent) DebugFillProperties

func (d *PointerPanZoomUpdateEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerPanZoomUpdateEvent) Delta

func (d *PointerPanZoomUpdateEvent) Delta() ui.Offset

func (*PointerPanZoomUpdateEvent) Device

func (d *PointerPanZoomUpdateEvent) Device() int

func (*PointerPanZoomUpdateEvent) Distance

func (d *PointerPanZoomUpdateEvent) Distance() float64

func (*PointerPanZoomUpdateEvent) DistanceMax

func (d *PointerPanZoomUpdateEvent) DistanceMax() float64

func (*PointerPanZoomUpdateEvent) DistanceMin

func (d *PointerPanZoomUpdateEvent) DistanceMin() float64

func (*PointerPanZoomUpdateEvent) Down

func (d *PointerPanZoomUpdateEvent) Down() bool

func (*PointerPanZoomUpdateEvent) EmbedderID

func (d *PointerPanZoomUpdateEvent) EmbedderID() int

func (*PointerPanZoomUpdateEvent) Kind

func (d *PointerPanZoomUpdateEvent) Kind() ui.PointerDeviceKind

func (*PointerPanZoomUpdateEvent) LocalDelta

func (d *PointerPanZoomUpdateEvent) LocalDelta() ui.Offset

func (*PointerPanZoomUpdateEvent) LocalPan

func (e *PointerPanZoomUpdateEvent) LocalPan() ui.Offset

LocalPan is Pan in the coordinates of the target.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.localPan

func (*PointerPanZoomUpdateEvent) LocalPanDelta

func (e *PointerPanZoomUpdateEvent) LocalPanDelta() ui.Offset

LocalPanDelta is PanDelta in the coordinates of the target.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.localPanDelta

func (*PointerPanZoomUpdateEvent) LocalPosition

func (d *PointerPanZoomUpdateEvent) LocalPosition() ui.Offset

func (*PointerPanZoomUpdateEvent) Obscured

func (d *PointerPanZoomUpdateEvent) Obscured() bool

func (*PointerPanZoomUpdateEvent) Orientation

func (d *PointerPanZoomUpdateEvent) Orientation() float64

func (*PointerPanZoomUpdateEvent) Original

func (d *PointerPanZoomUpdateEvent) Original() PointerEvent

func (*PointerPanZoomUpdateEvent) Pan

Pan is how far the fingers moved since the gesture started, in the coordinates of the view.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.pan

func (*PointerPanZoomUpdateEvent) PanDelta

func (e *PointerPanZoomUpdateEvent) PanDelta() ui.Offset

PanDelta is the change of Pan since the last update.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.panDelta

func (*PointerPanZoomUpdateEvent) PlatformData

func (d *PointerPanZoomUpdateEvent) PlatformData() int

func (*PointerPanZoomUpdateEvent) Pointer

func (d *PointerPanZoomUpdateEvent) Pointer() int

func (*PointerPanZoomUpdateEvent) Position

func (d *PointerPanZoomUpdateEvent) Position() ui.Offset

func (*PointerPanZoomUpdateEvent) Pressure

func (d *PointerPanZoomUpdateEvent) Pressure() float64

func (*PointerPanZoomUpdateEvent) PressureMax

func (d *PointerPanZoomUpdateEvent) PressureMax() float64

func (*PointerPanZoomUpdateEvent) PressureMin

func (d *PointerPanZoomUpdateEvent) PressureMin() float64

func (*PointerPanZoomUpdateEvent) RadiusMajor

func (d *PointerPanZoomUpdateEvent) RadiusMajor() float64

func (*PointerPanZoomUpdateEvent) RadiusMax

func (d *PointerPanZoomUpdateEvent) RadiusMax() float64

func (*PointerPanZoomUpdateEvent) RadiusMin

func (d *PointerPanZoomUpdateEvent) RadiusMin() float64

func (*PointerPanZoomUpdateEvent) RadiusMinor

func (d *PointerPanZoomUpdateEvent) RadiusMinor() float64

func (*PointerPanZoomUpdateEvent) Respond

func (d *PointerPanZoomUpdateEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerPanZoomUpdateEvent) Rotation

func (e *PointerPanZoomUpdateEvent) Rotation() float64

Rotation is the rotation since the gesture started, in radians.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.rotation

func (*PointerPanZoomUpdateEvent) Scale

Scale is the scale factor since the gesture started.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.scale

func (*PointerPanZoomUpdateEvent) Size

func (d *PointerPanZoomUpdateEvent) Size() float64

func (*PointerPanZoomUpdateEvent) String

func (e *PointerPanZoomUpdateEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.toString

func (*PointerPanZoomUpdateEvent) Synthesized

func (d *PointerPanZoomUpdateEvent) Synthesized() bool

func (*PointerPanZoomUpdateEvent) Tilt

func (d *PointerPanZoomUpdateEvent) Tilt() float64

func (*PointerPanZoomUpdateEvent) TimeStamp

func (d *PointerPanZoomUpdateEvent) TimeStamp() time.Duration

func (*PointerPanZoomUpdateEvent) Transform

func (d *PointerPanZoomUpdateEvent) Transform() *ui.Matrix4

func (*PointerPanZoomUpdateEvent) Transformed

func (e *PointerPanZoomUpdateEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerPanZoomUpdateEvent.transformed

func (*PointerPanZoomUpdateEvent) ViewID

func (d *PointerPanZoomUpdateEvent) ViewID() ui.ViewID

type PointerRemovedEvent

type PointerRemovedEvent struct {
	// contains filtered or unexported fields
}

PointerRemovedEvent is an event: the device is no longer tracking the pointer. For example, the pointer might be a touch that ended or a mouse that left the window.

Flutter: gestures/events.dart PointerRemovedEvent

func NewPointerRemovedEvent

func NewPointerRemovedEvent(opts ...PointerEventOpts) *PointerRemovedEvent

NewPointerRemovedEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerRemovedEvent.new

func (*PointerRemovedEvent) Buttons

func (d *PointerRemovedEvent) Buttons() int

func (*PointerRemovedEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerRemovedEvent.copyWith

func (*PointerRemovedEvent) DebugFillProperties

func (d *PointerRemovedEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerRemovedEvent) Delta

func (d *PointerRemovedEvent) Delta() ui.Offset

func (*PointerRemovedEvent) Device

func (d *PointerRemovedEvent) Device() int

func (*PointerRemovedEvent) Distance

func (d *PointerRemovedEvent) Distance() float64

func (*PointerRemovedEvent) DistanceMax

func (d *PointerRemovedEvent) DistanceMax() float64

func (*PointerRemovedEvent) DistanceMin

func (d *PointerRemovedEvent) DistanceMin() float64

func (*PointerRemovedEvent) Down

func (d *PointerRemovedEvent) Down() bool

func (*PointerRemovedEvent) EmbedderID

func (d *PointerRemovedEvent) EmbedderID() int

func (*PointerRemovedEvent) Kind

func (d *PointerRemovedEvent) Kind() ui.PointerDeviceKind

func (*PointerRemovedEvent) LocalDelta

func (d *PointerRemovedEvent) LocalDelta() ui.Offset

func (*PointerRemovedEvent) LocalPosition

func (d *PointerRemovedEvent) LocalPosition() ui.Offset

func (*PointerRemovedEvent) Obscured

func (d *PointerRemovedEvent) Obscured() bool

func (*PointerRemovedEvent) Orientation

func (d *PointerRemovedEvent) Orientation() float64

func (*PointerRemovedEvent) Original

func (d *PointerRemovedEvent) Original() PointerEvent

func (*PointerRemovedEvent) PlatformData

func (d *PointerRemovedEvent) PlatformData() int

func (*PointerRemovedEvent) Pointer

func (d *PointerRemovedEvent) Pointer() int

func (*PointerRemovedEvent) Position

func (d *PointerRemovedEvent) Position() ui.Offset

func (*PointerRemovedEvent) Pressure

func (d *PointerRemovedEvent) Pressure() float64

func (*PointerRemovedEvent) PressureMax

func (d *PointerRemovedEvent) PressureMax() float64

func (*PointerRemovedEvent) PressureMin

func (d *PointerRemovedEvent) PressureMin() float64

func (*PointerRemovedEvent) RadiusMajor

func (d *PointerRemovedEvent) RadiusMajor() float64

func (*PointerRemovedEvent) RadiusMax

func (d *PointerRemovedEvent) RadiusMax() float64

func (*PointerRemovedEvent) RadiusMin

func (d *PointerRemovedEvent) RadiusMin() float64

func (*PointerRemovedEvent) RadiusMinor

func (d *PointerRemovedEvent) RadiusMinor() float64

func (*PointerRemovedEvent) Respond

func (d *PointerRemovedEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerRemovedEvent) Size

func (d *PointerRemovedEvent) Size() float64

func (*PointerRemovedEvent) String

func (e *PointerRemovedEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerRemovedEvent.toString

func (*PointerRemovedEvent) Synthesized

func (d *PointerRemovedEvent) Synthesized() bool

func (*PointerRemovedEvent) Tilt

func (d *PointerRemovedEvent) Tilt() float64

func (*PointerRemovedEvent) TimeStamp

func (d *PointerRemovedEvent) TimeStamp() time.Duration

func (*PointerRemovedEvent) Transform

func (d *PointerRemovedEvent) Transform() *ui.Matrix4

func (*PointerRemovedEvent) Transformed

func (e *PointerRemovedEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerRemovedEvent.transformed

func (*PointerRemovedEvent) ViewID

func (d *PointerRemovedEvent) ViewID() ui.ViewID

type PointerRoute

type PointerRoute func(event PointerEvent)

PointerRoute is a function that receives the pointer events of a route.

Flutter: gestures/pointer_router.dart PointerRoute

type PointerRouteHandle

type PointerRouteHandle struct {
	// contains filtered or unexported fields
}

PointerRouteHandle identifies a route that was added to a PointerRouter. It removes the route.

Deviation: Flutter removes a route by passing the same function again; Go functions can't be compared, so AddRoute returns a handle (SPEC §12.10).

Flutter: no counterpart

type PointerRouter

type PointerRouter struct {
	// contains filtered or unexported fields
}

PointerRouter routes pointer events to the routes registered for the pointer, and to the global routes. Per-pointer routes run before the global ones, each group in the order it was added.

Flutter: gestures/pointer_router.dart PointerRouter

func NewPointerRouter

func NewPointerRouter() *PointerRouter

NewPointerRouter creates a router without routes.

Flutter: gestures/pointer_router.dart PointerRouter.new

func (*PointerRouter) AddGlobalRoute

func (r *PointerRouter) AddGlobalRoute(route PointerRoute, transform *ui.Matrix4) PointerRouteHandle

AddGlobalRoute registers a route that receives every event, whatever its pointer. The route receives the events transformed by transform, if it is not nil.

Flutter: gestures/pointer_router.dart PointerRouter.addGlobalRoute

func (*PointerRouter) AddRoute

func (r *PointerRouter) AddRoute(pointer int, route PointerRoute, transform *ui.Matrix4) PointerRouteHandle

AddRoute registers a route for the events of the pointer. The route receives the events transformed by transform, if it is not nil.

Flutter: gestures/pointer_router.dart PointerRouter.addRoute

func (*PointerRouter) DebugGlobalRouteCount

func (r *PointerRouter) DebugGlobalRouteCount() int

DebugGlobalRouteCount is the number of global routes. It is meant for tests that look for leaks, and panics with the tag DebugOnly in release builds.

Flutter: gestures/pointer_router.dart PointerRouter.debugGlobalRouteCount

func (*PointerRouter) RemoveGlobalRoute

func (r *PointerRouter) RemoveGlobalRoute(handle PointerRouteHandle)

RemoveGlobalRoute removes a global route. Removing a route that is not registered panics with the tag PointerRouteNotFound in debug builds.

Flutter: gestures/pointer_router.dart PointerRouter.removeGlobalRoute

func (*PointerRouter) RemoveRoute

func (r *PointerRouter) RemoveRoute(pointer int, handle PointerRouteHandle)

RemoveRoute removes a route added for the pointer. Removing a route that is not registered panics with the tag PointerRouteNotFound in debug builds.

Flutter: gestures/pointer_router.dart PointerRouter.removeRoute

func (*PointerRouter) Route

func (r *PointerRouter) Route(event PointerEvent)

Route calls the routes of the event's pointer, then the global routes. A route that was removed by a route called earlier for the same event is not called, and one that was added is not called until the next event.

Flutter: gestures/pointer_router.dart PointerRouter.route

type PointerScaleEvent

type PointerScaleEvent struct {
	// contains filtered or unexported fields
}

PointerScaleEvent is an event: the pointer issued a scale signal, such as a pinch of a trackpad. Scale is the factor.

Flutter: gestures/events.dart PointerScaleEvent

func NewPointerScaleEvent

func NewPointerScaleEvent(opts ...PointerEventOpts) *PointerScaleEvent

NewPointerScaleEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerScaleEvent.new

func (*PointerScaleEvent) Buttons

func (d *PointerScaleEvent) Buttons() int

func (*PointerScaleEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerScaleEvent.copyWith

func (*PointerScaleEvent) DebugFillProperties

func (d *PointerScaleEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerScaleEvent) Delta

func (d *PointerScaleEvent) Delta() ui.Offset

func (*PointerScaleEvent) Device

func (d *PointerScaleEvent) Device() int

func (*PointerScaleEvent) Distance

func (d *PointerScaleEvent) Distance() float64

func (*PointerScaleEvent) DistanceMax

func (d *PointerScaleEvent) DistanceMax() float64

func (*PointerScaleEvent) DistanceMin

func (d *PointerScaleEvent) DistanceMin() float64

func (*PointerScaleEvent) Down

func (d *PointerScaleEvent) Down() bool

func (*PointerScaleEvent) EmbedderID

func (d *PointerScaleEvent) EmbedderID() int

func (*PointerScaleEvent) Kind

func (d *PointerScaleEvent) Kind() ui.PointerDeviceKind

func (*PointerScaleEvent) LocalDelta

func (d *PointerScaleEvent) LocalDelta() ui.Offset

func (*PointerScaleEvent) LocalPosition

func (d *PointerScaleEvent) LocalPosition() ui.Offset

func (*PointerScaleEvent) Obscured

func (d *PointerScaleEvent) Obscured() bool

func (*PointerScaleEvent) Orientation

func (d *PointerScaleEvent) Orientation() float64

func (*PointerScaleEvent) Original

func (d *PointerScaleEvent) Original() PointerEvent

func (*PointerScaleEvent) PlatformData

func (d *PointerScaleEvent) PlatformData() int

func (*PointerScaleEvent) Pointer

func (d *PointerScaleEvent) Pointer() int

func (*PointerScaleEvent) Position

func (d *PointerScaleEvent) Position() ui.Offset

func (*PointerScaleEvent) Pressure

func (d *PointerScaleEvent) Pressure() float64

func (*PointerScaleEvent) PressureMax

func (d *PointerScaleEvent) PressureMax() float64

func (*PointerScaleEvent) PressureMin

func (d *PointerScaleEvent) PressureMin() float64

func (*PointerScaleEvent) RadiusMajor

func (d *PointerScaleEvent) RadiusMajor() float64

func (*PointerScaleEvent) RadiusMax

func (d *PointerScaleEvent) RadiusMax() float64

func (*PointerScaleEvent) RadiusMin

func (d *PointerScaleEvent) RadiusMin() float64

func (*PointerScaleEvent) RadiusMinor

func (d *PointerScaleEvent) RadiusMinor() float64

func (*PointerScaleEvent) Respond

func (d *PointerScaleEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerScaleEvent) Scale

func (e *PointerScaleEvent) Scale() float64

Scale is the scale factor of the signal.

Flutter: gestures/events.dart PointerScaleEvent.scale

func (*PointerScaleEvent) Size

func (d *PointerScaleEvent) Size() float64

func (*PointerScaleEvent) String

func (e *PointerScaleEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerScaleEvent.toString

func (*PointerScaleEvent) Synthesized

func (d *PointerScaleEvent) Synthesized() bool

func (*PointerScaleEvent) Tilt

func (d *PointerScaleEvent) Tilt() float64

func (*PointerScaleEvent) TimeStamp

func (d *PointerScaleEvent) TimeStamp() time.Duration

func (*PointerScaleEvent) Transform

func (d *PointerScaleEvent) Transform() *ui.Matrix4

func (*PointerScaleEvent) Transformed

func (e *PointerScaleEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerScaleEvent.transformed

func (*PointerScaleEvent) ViewID

func (d *PointerScaleEvent) ViewID() ui.ViewID

type PointerScrollEvent

type PointerScrollEvent struct {
	// contains filtered or unexported fields
}

PointerScrollEvent is an event: the pointer issued a scroll signal, such as a mouse wheel turning. ScrollDelta is how far to scroll, in logical pixels.

Flutter: gestures/events.dart PointerScrollEvent

func NewPointerScrollEvent

func NewPointerScrollEvent(opts ...PointerEventOpts) *PointerScrollEvent

NewPointerScrollEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerScrollEvent.new

func (*PointerScrollEvent) Buttons

func (d *PointerScrollEvent) Buttons() int

func (*PointerScrollEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerScrollEvent.copyWith

func (*PointerScrollEvent) DebugFillProperties

func (e *PointerScrollEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event and its scroll delta.

Flutter: gestures/events.dart PointerScrollEvent.debugFillProperties

func (*PointerScrollEvent) Delta

func (d *PointerScrollEvent) Delta() ui.Offset

func (*PointerScrollEvent) Device

func (d *PointerScrollEvent) Device() int

func (*PointerScrollEvent) Distance

func (d *PointerScrollEvent) Distance() float64

func (*PointerScrollEvent) DistanceMax

func (d *PointerScrollEvent) DistanceMax() float64

func (*PointerScrollEvent) DistanceMin

func (d *PointerScrollEvent) DistanceMin() float64

func (*PointerScrollEvent) Down

func (d *PointerScrollEvent) Down() bool

func (*PointerScrollEvent) EmbedderID

func (d *PointerScrollEvent) EmbedderID() int

func (*PointerScrollEvent) Kind

func (d *PointerScrollEvent) Kind() ui.PointerDeviceKind

func (*PointerScrollEvent) LocalDelta

func (d *PointerScrollEvent) LocalDelta() ui.Offset

func (*PointerScrollEvent) LocalPosition

func (d *PointerScrollEvent) LocalPosition() ui.Offset

func (*PointerScrollEvent) Obscured

func (d *PointerScrollEvent) Obscured() bool

func (*PointerScrollEvent) Orientation

func (d *PointerScrollEvent) Orientation() float64

func (*PointerScrollEvent) Original

func (d *PointerScrollEvent) Original() PointerEvent

func (*PointerScrollEvent) PlatformData

func (d *PointerScrollEvent) PlatformData() int

func (*PointerScrollEvent) Pointer

func (d *PointerScrollEvent) Pointer() int

func (*PointerScrollEvent) Position

func (d *PointerScrollEvent) Position() ui.Offset

func (*PointerScrollEvent) Pressure

func (d *PointerScrollEvent) Pressure() float64

func (*PointerScrollEvent) PressureMax

func (d *PointerScrollEvent) PressureMax() float64

func (*PointerScrollEvent) PressureMin

func (d *PointerScrollEvent) PressureMin() float64

func (*PointerScrollEvent) RadiusMajor

func (d *PointerScrollEvent) RadiusMajor() float64

func (*PointerScrollEvent) RadiusMax

func (d *PointerScrollEvent) RadiusMax() float64

func (*PointerScrollEvent) RadiusMin

func (d *PointerScrollEvent) RadiusMin() float64

func (*PointerScrollEvent) RadiusMinor

func (d *PointerScrollEvent) RadiusMinor() float64

func (*PointerScrollEvent) Respond

func (d *PointerScrollEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerScrollEvent) ScrollDelta

func (e *PointerScrollEvent) ScrollDelta() ui.Offset

ScrollDelta is how far the pointer scrolls, in logical pixels.

Flutter: gestures/events.dart PointerScrollEvent.scrollDelta

func (*PointerScrollEvent) Size

func (d *PointerScrollEvent) Size() float64

func (*PointerScrollEvent) String

func (e *PointerScrollEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerScrollEvent.toString

func (*PointerScrollEvent) Synthesized

func (d *PointerScrollEvent) Synthesized() bool

func (*PointerScrollEvent) Tilt

func (d *PointerScrollEvent) Tilt() float64

func (*PointerScrollEvent) TimeStamp

func (d *PointerScrollEvent) TimeStamp() time.Duration

func (*PointerScrollEvent) Transform

func (d *PointerScrollEvent) Transform() *ui.Matrix4

func (*PointerScrollEvent) Transformed

func (e *PointerScrollEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerScrollEvent.transformed

func (*PointerScrollEvent) ViewID

func (d *PointerScrollEvent) ViewID() ui.ViewID

type PointerScrollInertiaCancelEvent

type PointerScrollInertiaCancelEvent struct {
	// contains filtered or unexported fields
}

PointerScrollInertiaCancelEvent is an event: the pointer issued a signal that stops the inertia of a scroll, such as fingers touching a trackpad while it still scrolls.

Flutter: gestures/events.dart PointerScrollInertiaCancelEvent

func NewPointerScrollInertiaCancelEvent

func NewPointerScrollInertiaCancelEvent(opts ...PointerEventOpts) *PointerScrollInertiaCancelEvent

NewPointerScrollInertiaCancelEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerScrollInertiaCancelEvent.new

func (*PointerScrollInertiaCancelEvent) Buttons

func (d *PointerScrollInertiaCancelEvent) Buttons() int

func (*PointerScrollInertiaCancelEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerScrollInertiaCancelEvent.copyWith

func (*PointerScrollInertiaCancelEvent) DebugFillProperties

func (d *PointerScrollInertiaCancelEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerScrollInertiaCancelEvent) Delta

func (d *PointerScrollInertiaCancelEvent) Delta() ui.Offset

func (*PointerScrollInertiaCancelEvent) Device

func (d *PointerScrollInertiaCancelEvent) Device() int

func (*PointerScrollInertiaCancelEvent) Distance

func (d *PointerScrollInertiaCancelEvent) Distance() float64

func (*PointerScrollInertiaCancelEvent) DistanceMax

func (d *PointerScrollInertiaCancelEvent) DistanceMax() float64

func (*PointerScrollInertiaCancelEvent) DistanceMin

func (d *PointerScrollInertiaCancelEvent) DistanceMin() float64

func (*PointerScrollInertiaCancelEvent) Down

func (d *PointerScrollInertiaCancelEvent) Down() bool

func (*PointerScrollInertiaCancelEvent) EmbedderID

func (d *PointerScrollInertiaCancelEvent) EmbedderID() int

func (*PointerScrollInertiaCancelEvent) Kind

func (d *PointerScrollInertiaCancelEvent) Kind() ui.PointerDeviceKind

func (*PointerScrollInertiaCancelEvent) LocalDelta

func (d *PointerScrollInertiaCancelEvent) LocalDelta() ui.Offset

func (*PointerScrollInertiaCancelEvent) LocalPosition

func (d *PointerScrollInertiaCancelEvent) LocalPosition() ui.Offset

func (*PointerScrollInertiaCancelEvent) Obscured

func (d *PointerScrollInertiaCancelEvent) Obscured() bool

func (*PointerScrollInertiaCancelEvent) Orientation

func (d *PointerScrollInertiaCancelEvent) Orientation() float64

func (*PointerScrollInertiaCancelEvent) Original

func (d *PointerScrollInertiaCancelEvent) Original() PointerEvent

func (*PointerScrollInertiaCancelEvent) PlatformData

func (d *PointerScrollInertiaCancelEvent) PlatformData() int

func (*PointerScrollInertiaCancelEvent) Pointer

func (d *PointerScrollInertiaCancelEvent) Pointer() int

func (*PointerScrollInertiaCancelEvent) Position

func (d *PointerScrollInertiaCancelEvent) Position() ui.Offset

func (*PointerScrollInertiaCancelEvent) Pressure

func (d *PointerScrollInertiaCancelEvent) Pressure() float64

func (*PointerScrollInertiaCancelEvent) PressureMax

func (d *PointerScrollInertiaCancelEvent) PressureMax() float64

func (*PointerScrollInertiaCancelEvent) PressureMin

func (d *PointerScrollInertiaCancelEvent) PressureMin() float64

func (*PointerScrollInertiaCancelEvent) RadiusMajor

func (d *PointerScrollInertiaCancelEvent) RadiusMajor() float64

func (*PointerScrollInertiaCancelEvent) RadiusMax

func (d *PointerScrollInertiaCancelEvent) RadiusMax() float64

func (*PointerScrollInertiaCancelEvent) RadiusMin

func (d *PointerScrollInertiaCancelEvent) RadiusMin() float64

func (*PointerScrollInertiaCancelEvent) RadiusMinor

func (d *PointerScrollInertiaCancelEvent) RadiusMinor() float64

func (*PointerScrollInertiaCancelEvent) Respond

func (d *PointerScrollInertiaCancelEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerScrollInertiaCancelEvent) Size

func (d *PointerScrollInertiaCancelEvent) Size() float64

func (*PointerScrollInertiaCancelEvent) String

String describes the event on one line.

Flutter: gestures/events.dart PointerScrollInertiaCancelEvent.toString

func (*PointerScrollInertiaCancelEvent) Synthesized

func (d *PointerScrollInertiaCancelEvent) Synthesized() bool

func (*PointerScrollInertiaCancelEvent) Tilt

func (d *PointerScrollInertiaCancelEvent) Tilt() float64

func (*PointerScrollInertiaCancelEvent) TimeStamp

func (d *PointerScrollInertiaCancelEvent) TimeStamp() time.Duration

func (*PointerScrollInertiaCancelEvent) Transform

func (d *PointerScrollInertiaCancelEvent) Transform() *ui.Matrix4

func (*PointerScrollInertiaCancelEvent) Transformed

func (e *PointerScrollInertiaCancelEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerScrollInertiaCancelEvent.transformed

func (*PointerScrollInertiaCancelEvent) ViewID

func (d *PointerScrollInertiaCancelEvent) ViewID() ui.ViewID

type PointerSignalEvent

type PointerSignalEvent interface {
	PointerEvent
	// Respond tells the platform whether it may do its default action for the
	// event, after the framework has had its turn.
	//
	// Flutter: gestures/events.dart PointerSignalEvent.respond
	Respond(allowPlatformDefault bool)
	// contains filtered or unexported methods
}

PointerSignalEvent is an event that happens without the pointer being down: a scroll or a scale. Only one object may handle it, which it claims with PointerSignalResolver.

Flutter: gestures/events.dart PointerSignalEvent

type PointerSignalResolvedCallback

type PointerSignalResolvedCallback func(event PointerSignalEvent)

PointerSignalResolvedCallback is called with the signal event the resolver resolved to.

Flutter: gestures/pointer_signal_resolver.dart PointerSignalResolvedCallback

type PointerSignalResolver

type PointerSignalResolver struct {
	// contains filtered or unexported fields
}

PointerSignalResolver lets the objects that handle a signal event compete for it: the first to Register wins, because hit testing visits the front-most object first. The binding calls Resolve after it has dispatched the event.

Flutter: gestures/pointer_signal_resolver.dart PointerSignalResolver

func NewPointerSignalResolver

func NewPointerSignalResolver() *PointerSignalResolver

NewPointerSignalResolver creates a resolver.

Flutter: gestures/pointer_signal_resolver.dart PointerSignalResolver.new

func (*PointerSignalResolver) Register

Register asks to handle the event. If a callback was registered already for this event, the new one is ignored. Registering for another event while one is pending panics with the tag PointerSignalEventMismatch in debug builds.

Flutter: gestures/pointer_signal_resolver.dart PointerSignalResolver.register

func (*PointerSignalResolver) Resolve

func (r *PointerSignalResolver) Resolve(event PointerSignalEvent)

Resolve calls the callback that registered first, or, if none did, tells the platform that it may do its default action for the event.

Flutter: gestures/pointer_signal_resolver.dart PointerSignalResolver.resolve

type PointerUpEvent

type PointerUpEvent struct {
	// contains filtered or unexported fields
}

PointerUpEvent is an event: the pointer has stopped making contact with the device. The pressure defaults to 0, and a device may report another.

Flutter: gestures/events.dart PointerUpEvent

func NewPointerUpEvent

func NewPointerUpEvent(opts ...PointerEventOpts) *PointerUpEvent

NewPointerUpEvent creates the event. It reads the fields of PointerEventOpts that the Flutter constructor has.

Flutter: gestures/events.dart PointerUpEvent.new

func (*PointerUpEvent) Buttons

func (d *PointerUpEvent) Buttons() int

func (*PointerUpEvent) CopyWith

CopyWith returns a copy with the fields replaced.

Flutter: gestures/events.dart PointerUpEvent.copyWith

func (*PointerUpEvent) DebugFillProperties

func (d *PointerUpEvent) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the event.

Flutter: gestures/events.dart _PointerEventDescription.debugFillProperties

func (*PointerUpEvent) Delta

func (d *PointerUpEvent) Delta() ui.Offset

func (*PointerUpEvent) Device

func (d *PointerUpEvent) Device() int

func (*PointerUpEvent) Distance

func (d *PointerUpEvent) Distance() float64

func (*PointerUpEvent) DistanceMax

func (d *PointerUpEvent) DistanceMax() float64

func (*PointerUpEvent) DistanceMin

func (d *PointerUpEvent) DistanceMin() float64

func (*PointerUpEvent) Down

func (d *PointerUpEvent) Down() bool

func (*PointerUpEvent) EmbedderID

func (d *PointerUpEvent) EmbedderID() int

func (*PointerUpEvent) Kind

func (d *PointerUpEvent) Kind() ui.PointerDeviceKind

func (*PointerUpEvent) LocalDelta

func (d *PointerUpEvent) LocalDelta() ui.Offset

func (*PointerUpEvent) LocalPosition

func (d *PointerUpEvent) LocalPosition() ui.Offset

func (*PointerUpEvent) Obscured

func (d *PointerUpEvent) Obscured() bool

func (*PointerUpEvent) Orientation

func (d *PointerUpEvent) Orientation() float64

func (*PointerUpEvent) Original

func (d *PointerUpEvent) Original() PointerEvent

func (*PointerUpEvent) PlatformData

func (d *PointerUpEvent) PlatformData() int

func (*PointerUpEvent) Pointer

func (d *PointerUpEvent) Pointer() int

func (*PointerUpEvent) Position

func (d *PointerUpEvent) Position() ui.Offset

func (*PointerUpEvent) Pressure

func (d *PointerUpEvent) Pressure() float64

func (*PointerUpEvent) PressureMax

func (d *PointerUpEvent) PressureMax() float64

func (*PointerUpEvent) PressureMin

func (d *PointerUpEvent) PressureMin() float64

func (*PointerUpEvent) RadiusMajor

func (d *PointerUpEvent) RadiusMajor() float64

func (*PointerUpEvent) RadiusMax

func (d *PointerUpEvent) RadiusMax() float64

func (*PointerUpEvent) RadiusMin

func (d *PointerUpEvent) RadiusMin() float64

func (*PointerUpEvent) RadiusMinor

func (d *PointerUpEvent) RadiusMinor() float64

func (*PointerUpEvent) Respond

func (d *PointerUpEvent) Respond(allowPlatformDefault bool)

Respond calls the callback the event was made with, if any.

Flutter: gestures/events.dart PointerSignalEvent.respond

func (*PointerUpEvent) Size

func (d *PointerUpEvent) Size() float64

func (*PointerUpEvent) String

func (e *PointerUpEvent) String() string

String describes the event on one line.

Flutter: gestures/events.dart PointerUpEvent.toString

func (*PointerUpEvent) Synthesized

func (d *PointerUpEvent) Synthesized() bool

func (*PointerUpEvent) Tilt

func (d *PointerUpEvent) Tilt() float64

func (*PointerUpEvent) TimeStamp

func (d *PointerUpEvent) TimeStamp() time.Duration

func (*PointerUpEvent) Transform

func (d *PointerUpEvent) Transform() *ui.Matrix4

func (*PointerUpEvent) Transformed

func (e *PointerUpEvent) Transformed(transform *ui.Matrix4) PointerEvent

Transformed returns the event in the coordinates that transform leads to.

Flutter: gestures/events.dart PointerUpEvent.transformed

func (*PointerUpEvent) ViewID

func (d *PointerUpEvent) ViewID() ui.ViewID

type PolynomialFit

type PolynomialFit struct {
	// Coefficients are the coefficients of the polynomial, lowest degree
	// first.
	//
	// Flutter: gestures/lsq_solver.dart PolynomialFit.coefficients
	Coefficients []float64
	// Confidence is the coefficient of determination of the fit.
	//
	// Flutter: gestures/lsq_solver.dart PolynomialFit.confidence
	Confidence float64
}

PolynomialFit is a polynomial that fits some points: the coefficients, from the constant term up, and how well it fits (1 is a perfect fit).

Flutter: gestures/lsq_solver.dart PolynomialFit

func NewPolynomialFit

func NewPolynomialFit(degree int) *PolynomialFit

NewPolynomialFit creates a fit of the degree, with zero coefficients.

Flutter: gestures/lsq_solver.dart PolynomialFit.new

func (*PolynomialFit) String

func (f *PolynomialFit) String() string

String describes the fit.

Flutter: gestures/lsq_solver.dart PolynomialFit.toString

type PositionedGestureDetails

type PositionedGestureDetails interface {
	// GlobalPosition is the position in the global coordinates of the view.
	//
	// Flutter: gestures/gesture_details.dart PositionedGestureDetails.globalPosition
	GetGlobalPosition() ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	//
	// Flutter: gestures/gesture_details.dart PositionedGestureDetails.localPosition
	GetLocalPosition() ui.Offset
}

PositionedGestureDetails is the data of a gesture that happened at a position.

Flutter: gestures/gesture_details.dart PositionedGestureDetails

type PrimaryPointerGestureRecognizer

type PrimaryPointerGestureRecognizer struct {
	OneSequenceGestureRecognizer
	// contains filtered or unexported fields
}

PrimaryPointerGestureRecognizer is a recognizer that tracks one primary pointer (the first that goes down) and ignores the others while it does.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer

func (*PrimaryPointerGestureRecognizer) AcceptGesture

func (r *PrimaryPointerGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture marks the gesture as accepted and stops the deadline timer.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.acceptGesture

func (*PrimaryPointerGestureRecognizer) AddAllowedPointer

func (r *PrimaryPointerGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the pointer, and makes it the primary pointer if the recognizer is ready.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.addAllowedPointer

func (*PrimaryPointerGestureRecognizer) Deadline

Deadline is how long after the down event DidExceedDeadline is called.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.deadline

func (*PrimaryPointerGestureRecognizer) DebugFillProperties

DebugFillProperties adds the debug owner and the state.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.debugFillProperties

func (*PrimaryPointerGestureRecognizer) DidExceedDeadline

func (r *PrimaryPointerGestureRecognizer) DidExceedDeadline()

DidExceedDeadline is called when the deadline passes. A recognizer with a deadline overrides it; the default panics with the tag RecognizerNoDeadline in debug builds, if there is none.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.didExceedDeadline

func (*PrimaryPointerGestureRecognizer) DidExceedDeadlineWithEvent

func (r *PrimaryPointerGestureRecognizer) DidExceedDeadlineWithEvent(*PointerDownEvent)

DidExceedDeadlineWithEvent calls DidExceedDeadline.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.didExceedDeadlineWithEvent

func (*PrimaryPointerGestureRecognizer) DidStopTrackingLastPointer

func (r *PrimaryPointerGestureRecognizer) DidStopTrackingLastPointer(int)

DidStopTrackingLastPointer makes the recognizer ready again.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.didStopTrackingLastPointer

func (*PrimaryPointerGestureRecognizer) Dispose

func (r *PrimaryPointerGestureRecognizer) Dispose()

Dispose stops the timer.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.dispose

func (*PrimaryPointerGestureRecognizer) HandleEvent

func (r *PrimaryPointerGestureRecognizer) HandleEvent(event PointerEvent)

HandleEvent gives the events of the primary pointer to HandlePrimaryPointer, and rejects the recognizer when the pointer moves farther than the slop tolerance.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.handleEvent

func (*PrimaryPointerGestureRecognizer) HandleNonAllowedPointer

func (r *PrimaryPointerGestureRecognizer) HandleNonAllowedPointer(event *PointerDownEvent)

HandleNonAllowedPointer rejects the recognizer unless it has already won.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.handleNonAllowedPointer

func (*PrimaryPointerGestureRecognizer) InitPrimaryPointer

func (r *PrimaryPointerGestureRecognizer) InitPrimaryPointer(binding *GestureBinding, self PrimaryPointerHooks, opts PrimaryPointerOpts)

InitPrimaryPointer sets up the recognizer; self is the recognizer that embeds it. A negative slop tolerance panics with the tag SlopToleranceNegative in debug builds.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.new

func (*PrimaryPointerGestureRecognizer) InitialPosition

InitialPosition is where the primary pointer went down.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.initialPosition

func (*PrimaryPointerGestureRecognizer) PostAcceptSlopTolerance

func (r *PrimaryPointerGestureRecognizer) PostAcceptSlopTolerance() foundation.Opt[float64]

PostAcceptSlopTolerance is how far the pointer may move after the recognizer won; None for any distance.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.postAcceptSlopTolerance

func (*PrimaryPointerGestureRecognizer) PreAcceptSlopTolerance

func (r *PrimaryPointerGestureRecognizer) PreAcceptSlopTolerance() foundation.Opt[float64]

PreAcceptSlopTolerance is how far the pointer may move before the recognizer wins the arena without it giving up; None for any distance.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.preAcceptSlopTolerance

func (*PrimaryPointerGestureRecognizer) PrimaryPointer

func (r *PrimaryPointerGestureRecognizer) PrimaryPointer() foundation.Opt[int]

PrimaryPointer is the pointer the recognizer follows; None while it is ready.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.primaryPointer

func (*PrimaryPointerGestureRecognizer) RejectGesture

func (r *PrimaryPointerGestureRecognizer) RejectGesture(pointer int)

RejectGesture ends the gesture if it was possible.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.rejectGesture

func (*PrimaryPointerGestureRecognizer) State

State is the state of the recognizer.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.state

type PrimaryPointerHooks

type PrimaryPointerHooks interface {
	OneSequenceHooks
	// HandlePrimaryPointer is called with the events of the primary pointer.
	//
	// Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.handlePrimaryPointer
	HandlePrimaryPointer(event PointerEvent)
	// DidExceedDeadline is called when the deadline passes with the pointer
	// still down.
	//
	// Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.didExceedDeadline
	DidExceedDeadline()
	// DidExceedDeadlineWithEvent is called with the down event when the
	// deadline passes. The default calls DidExceedDeadline.
	//
	// Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.didExceedDeadlineWithEvent
	DidExceedDeadlineWithEvent(event *PointerDownEvent)
}

PrimaryPointerHooks are the methods of a PrimaryPointerGestureRecognizer that the subclass supplies or may override.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer

type PrimaryPointerOpts

type PrimaryPointerOpts struct {
	GestureRecognizerOpts
	// Deadline is how long after the down event DidExceedDeadline is called;
	// None for no deadline.
	Deadline foundation.Opt[time.Duration]
	// PreAcceptSlopTolerance is how far the pointer may move before the
	// recognizer wins the arena, without it giving up. The default is the touch
	// slop.
	PreAcceptSlopTolerance SlopTolerance
	// PostAcceptSlopTolerance is how far the pointer may move after the
	// recognizer won. The default is the touch slop.
	PostAcceptSlopTolerance SlopTolerance
}

PrimaryPointerOpts are the parameters of InitPrimaryPointer.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.new

type SamplingClock

type SamplingClock interface {
	// Now returns the time.
	//
	// Flutter: gestures/binding.dart SamplingClock.now
	Now() time.Time
	// AfterFunc calls f once after d, on any goroutine. It stands in for the
	// Timer.periodic of Flutter's resampler, which re-arms it.
	AfterFunc(d time.Duration, f func()) SamplingTimer
}

SamplingClock is the clock the event resampler reads. The default is the system clock; tests replace it through GestureBindingOpts.Clock.

Flutter: gestures/binding.dart SamplingClock

type SamplingTimer

type SamplingTimer interface {
	// Stop prevents the function from running.
	Stop() bool
}

SamplingTimer is a function waiting to run on a SamplingClock.

Flutter: dart:async Timer

type ScaleEndDetails

type ScaleEndDetails struct {
	// Velocity is the velocity of the last pointers.
	Velocity Velocity
	// ScaleVelocity is how fast the scale changed, in scale per second; -1 if
	// it is not known.
	ScaleVelocity float64
	// PointerCount is the number of pointers.
	PointerCount int
}

ScaleEndDetails is the data of a scale gesture that ended.

Flutter: gestures/scale.dart ScaleEndDetails

func (ScaleEndDetails) DebugFillProperties

func (d ScaleEndDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/scale.dart ScaleEndDetails.debugFillProperties

type ScaleGestureRecognizer

type ScaleGestureRecognizer struct {
	OneSequenceGestureRecognizer

	// DragStartBehavior is where the gesture starts.
	//
	// Flutter: gestures/scale.dart ScaleGestureRecognizer.dragStartBehavior
	DragStartBehavior DragStartBehavior
	// OnStart is called when the pointers start a scale.
	//
	// Flutter: gestures/scale.dart ScaleGestureRecognizer.onStart
	OnStart GestureScaleStartCallback
	// OnUpdate is called when the scale changes.
	//
	// Flutter: gestures/scale.dart ScaleGestureRecognizer.onUpdate
	OnUpdate GestureScaleUpdateCallback
	// OnEnd is called when the pointers end the scale, or their number changes.
	//
	// Flutter: gestures/scale.dart ScaleGestureRecognizer.onEnd
	OnEnd GestureScaleEndCallback
	// TrackpadScrollCausesScale makes a trackpad scroll scale.
	//
	// Flutter: gestures/scale.dart ScaleGestureRecognizer.trackpadScrollCausesScale
	TrackpadScrollCausesScale bool
	// TrackpadScrollToScaleFactor is how a trackpad scroll turns into a scale.
	//
	// Flutter: gestures/scale.dart ScaleGestureRecognizer.trackpadScrollToScaleFactor
	TrackpadScrollToScaleFactor ui.Offset
	// contains filtered or unexported fields
}

ScaleGestureRecognizer recognizes a scale gesture: one or more pointers that move, spread, close or rotate.

Flutter: gestures/scale.dart ScaleGestureRecognizer

func NewScaleGestureRecognizer

func NewScaleGestureRecognizer(binding *GestureBinding, opts ...ScaleGestureRecognizerOpts) *ScaleGestureRecognizer

NewScaleGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/scale.dart ScaleGestureRecognizer.new

func (*ScaleGestureRecognizer) AcceptGesture

func (r *ScaleGestureRecognizer) AcceptGesture(int)

AcceptGesture starts the scale gesture.

Flutter: gestures/scale.dart ScaleGestureRecognizer.acceptGesture

func (*ScaleGestureRecognizer) AddAllowedPointer

func (r *ScaleGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the pointer.

Flutter: gestures/scale.dart ScaleGestureRecognizer.addAllowedPointer

func (*ScaleGestureRecognizer) AddAllowedPointerPanZoom

func (r *ScaleGestureRecognizer) AddAllowedPointerPanZoom(event *PointerPanZoomStartEvent)

AddAllowedPointerPanZoom tracks the trackpad gesture.

Flutter: gestures/scale.dart ScaleGestureRecognizer.addAllowedPointerPanZoom

func (*ScaleGestureRecognizer) DebugDescription

func (r *ScaleGestureRecognizer) DebugDescription() string

DebugDescription is "scale".

Flutter: gestures/scale.dart ScaleGestureRecognizer.debugDescription

func (*ScaleGestureRecognizer) DidStopTrackingLastPointer

func (r *ScaleGestureRecognizer) DidStopTrackingLastPointer(int)

DidStopTrackingLastPointer makes the recognizer ready again.

Flutter: gestures/scale.dart ScaleGestureRecognizer.didStopTrackingLastPointer

func (*ScaleGestureRecognizer) Dispose

func (r *ScaleGestureRecognizer) Dispose()

Dispose releases the velocity trackers.

Flutter: gestures/scale.dart ScaleGestureRecognizer.dispose

func (*ScaleGestureRecognizer) HandleEvent

func (r *ScaleGestureRecognizer) HandleEvent(event PointerEvent)

HandleEvent follows the pointers.

Deviation: it forgets the velocity tracker of a pointer when the pointer is up or cancelled (SPEC §12.10).

Flutter: gestures/scale.dart ScaleGestureRecognizer.handleEvent

func (*ScaleGestureRecognizer) IsPointerPanZoomAllowed

func (r *ScaleGestureRecognizer) IsPointerPanZoomAllowed(*PointerPanZoomStartEvent) bool

IsPointerPanZoomAllowed allows every trackpad gesture.

Flutter: gestures/scale.dart ScaleGestureRecognizer.isPointerPanZoomAllowed

func (*ScaleGestureRecognizer) PointerCount

func (r *ScaleGestureRecognizer) PointerCount() int

PointerCount is the number of pointers: two for each trackpad gesture and one for each other pointer.

Flutter: gestures/scale.dart ScaleGestureRecognizer.pointerCount

func (*ScaleGestureRecognizer) RejectGesture

func (r *ScaleGestureRecognizer) RejectGesture(pointer int)

RejectGesture forgets the pointer.

Flutter: gestures/scale.dart ScaleGestureRecognizer.rejectGesture

type ScaleGestureRecognizerOpts

type ScaleGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	AllowedButtonsFilter AllowedButtonsFilter
	// DragStartBehavior is where the gesture starts; the default is
	// DragStartBehaviorDown.
	DragStartBehavior DragStartBehavior
	// TrackpadScrollCausesScale makes a trackpad scroll scale.
	TrackpadScrollCausesScale bool
	// TrackpadScrollToScaleFactor is how a trackpad scroll turns into a scale;
	// the default is DefaultTrackpadScrollToScaleFactor.
	TrackpadScrollToScaleFactor foundation.Opt[ui.Offset]
}

ScaleGestureRecognizerOpts are the optional parameters of NewScaleGestureRecognizer.

Flutter: gestures/scale.dart ScaleGestureRecognizer.new

type ScaleStartDetails

type ScaleStartDetails struct {
	// FocalPoint is the initial focal point of the pointers, in global
	// coordinates.
	FocalPoint ui.Offset
	// LocalFocalPoint is FocalPoint in the coordinates of the target.
	LocalFocalPoint ui.Offset
	// PointerCount is the number of pointers.
	PointerCount int
	// SourceTimeStamp is the time of the event that started the gesture.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Kind is the kind of device of the first pointer.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

ScaleStartDetails is the data of a scale gesture that started.

Flutter: gestures/scale.dart ScaleStartDetails

func NewScaleStartDetails

func NewScaleStartDetails(opts ...ScaleStartOpts) ScaleStartDetails

NewScaleStartDetails creates the details.

Flutter: gestures/scale.dart ScaleStartDetails.new

func (ScaleStartDetails) DebugFillProperties

func (d ScaleStartDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/scale.dart ScaleStartDetails.debugFillProperties

type ScaleStartOpts

type ScaleStartOpts struct {
	// FocalPoint is the focal point of the pointers.
	FocalPoint ui.Offset
	// LocalFocalPoint is the focal point in local coordinates; the default is
	// FocalPoint.
	LocalFocalPoint foundation.Opt[ui.Offset]
	// PointerCount is the number of pointers.
	PointerCount int
	// SourceTimeStamp is the time of the event.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

ScaleStartOpts are the optional parameters of NewScaleStartDetails.

Flutter: gestures/scale.dart ScaleStartDetails.new

type ScaleUpdateDetails

type ScaleUpdateDetails struct {
	// FocalPointDelta is how far the focal point moved since the last update.
	FocalPointDelta ui.Offset
	// FocalPoint is the focal point of the pointers, in global coordinates.
	FocalPoint ui.Offset
	// LocalFocalPoint is FocalPoint in the coordinates of the target.
	LocalFocalPoint ui.Offset
	// Scale is the scale since the gesture started.
	Scale float64
	// HorizontalScale is the horizontal scale since the gesture started.
	HorizontalScale float64
	// VerticalScale is the vertical scale since the gesture started.
	VerticalScale float64
	// Rotation is the rotation since the gesture started, in radians.
	Rotation float64
	// PointerCount is the number of pointers.
	PointerCount int
	// SourceTimeStamp is the time of the event.
	SourceTimeStamp foundation.Opt[time.Duration]
}

ScaleUpdateDetails is the data of a scale gesture that changed.

Flutter: gestures/scale.dart ScaleUpdateDetails

func NewScaleUpdateDetails

func NewScaleUpdateDetails(opts ...ScaleUpdateOpts) ScaleUpdateDetails

NewScaleUpdateDetails creates the details. A negative scale panics with the tag ScaleNegative in debug builds.

Flutter: gestures/scale.dart ScaleUpdateDetails.new

func (ScaleUpdateDetails) DebugFillProperties

func (d ScaleUpdateDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/scale.dart ScaleUpdateDetails.debugFillProperties

type ScaleUpdateOpts

type ScaleUpdateOpts struct {
	// FocalPoint is the focal point of the pointers.
	FocalPoint ui.Offset
	// LocalFocalPoint is the focal point in local coordinates; the default is
	// FocalPoint.
	LocalFocalPoint foundation.Opt[ui.Offset]
	// Scale is the scale; the default is 1.
	Scale foundation.Opt[float64]
	// HorizontalScale is the horizontal scale; the default is 1.
	HorizontalScale foundation.Opt[float64]
	// VerticalScale is the vertical scale; the default is 1.
	VerticalScale foundation.Opt[float64]
	// Rotation is the rotation in radians.
	Rotation float64
	// PointerCount is the number of pointers.
	PointerCount int
	// FocalPointDelta is how far the focal point moved.
	FocalPointDelta ui.Offset
	// SourceTimeStamp is the time of the event.
	SourceTimeStamp foundation.Opt[time.Duration]
}

ScaleUpdateOpts are the optional parameters of NewScaleUpdateDetails.

Flutter: gestures/scale.dart ScaleUpdateDetails.new

type SerialTapCancelDetails

type SerialTapCancelDetails struct {
	// Count is the number of the tap in the series that was cancelled.
	Count int
}

SerialTapCancelDetails is the data of a series tap that was cancelled.

Flutter: gestures/multitap.dart SerialTapCancelDetails

func NewSerialTapCancelDetails

func NewSerialTapCancelDetails(count int) SerialTapCancelDetails

NewSerialTapCancelDetails creates the details; a count of 0 is 1.

Flutter: gestures/multitap.dart SerialTapCancelDetails.new

func (SerialTapCancelDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/multitap.dart SerialTapCancelDetails.debugFillProperties

type SerialTapDownDetails

type SerialTapDownDetails struct {
	// GlobalPosition is where the pointer touched the screen.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device.
	Kind ui.PointerDeviceKind
	// Buttons are the buttons pressed.
	Buttons int
	// Count is the number of the tap in the series, starting at 1.
	Count int
}

SerialTapDownDetails is the data of a pointer that touched the screen and might be the n-th tap of a series.

Flutter: gestures/multitap.dart SerialTapDownDetails

func NewSerialTapDownDetails

func NewSerialTapDownDetails(kind ui.PointerDeviceKind, opts ...SerialTapDownOpts) SerialTapDownDetails

NewSerialTapDownDetails creates the details for a device of the kind. A count that is not positive panics with the tag SerialTapCountInvalid in debug builds.

Flutter: gestures/multitap.dart SerialTapDownDetails.new

func (SerialTapDownDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/multitap.dart SerialTapDownDetails.debugFillProperties

func (SerialTapDownDetails) GetGlobalPosition

func (d SerialTapDownDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/multitap.dart SerialTapDownDetails.globalPosition

func (SerialTapDownDetails) GetLocalPosition

func (d SerialTapDownDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/multitap.dart SerialTapDownDetails.localPosition

type SerialTapDownOpts

type SerialTapDownOpts struct {
	// GlobalPosition is where the pointer touched the screen.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// Buttons are the buttons pressed.
	Buttons int
	// Count is the number of the tap in the series; the default is 1.
	Count int
}

SerialTapDownOpts are the optional parameters of NewSerialTapDownDetails.

Flutter: gestures/multitap.dart SerialTapDownDetails.new

type SerialTapGestureRecognizer

type SerialTapGestureRecognizer struct {
	GestureRecognizerBase

	// OnSerialTapDown is called when a pointer that might be a tap of a series
	// touches the screen.
	//
	// Flutter: gestures/multitap.dart SerialTapGestureRecognizer.onSerialTapDown
	OnSerialTapDown GestureSerialTapDownCallback
	// OnSerialTapCancel is called when a tap of a series is cancelled.
	//
	// Flutter: gestures/multitap.dart SerialTapGestureRecognizer.onSerialTapCancel
	OnSerialTapCancel GestureSerialTapCancelCallback
	// OnSerialTapUp is called when a tap of a series ends.
	//
	// Flutter: gestures/multitap.dart SerialTapGestureRecognizer.onSerialTapUp
	OnSerialTapUp GestureSerialTapUpCallback
	// contains filtered or unexported fields
}

SerialTapGestureRecognizer recognizes a series of taps in quick succession, and reports the number of each tap.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer

func NewSerialTapGestureRecognizer

func NewSerialTapGestureRecognizer(binding *GestureBinding, opts ...SerialTapGestureRecognizerOpts) *SerialTapGestureRecognizer

NewSerialTapGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.new

func (*SerialTapGestureRecognizer) AcceptGesture

func (r *SerialTapGestureRecognizer) AcceptGesture(pointer int)

AcceptGesture records that the pending tap won.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.acceptGesture

func (*SerialTapGestureRecognizer) AddAllowedPointer

func (r *SerialTapGestureRecognizer) AddAllowedPointer(event *PointerDownEvent)

AddAllowedPointer tracks the tap, resetting the series if the tap is not part of it.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.addAllowedPointer

func (*SerialTapGestureRecognizer) DebugDescription

func (r *SerialTapGestureRecognizer) DebugDescription() string

DebugDescription is "serial tap".

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.debugDescription

func (*SerialTapGestureRecognizer) Dispose

func (r *SerialTapGestureRecognizer) Dispose()

Dispose resets the series.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.dispose

func (*SerialTapGestureRecognizer) IsPointerAllowed

func (r *SerialTapGestureRecognizer) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed allows a pointer if a callback is set.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.isPointerAllowed

func (*SerialTapGestureRecognizer) IsTrackingPointer

func (r *SerialTapGestureRecognizer) IsTrackingPointer() bool

IsTrackingPointer reports whether the recognizer tracks a pointer.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.isTrackingPointer

func (*SerialTapGestureRecognizer) RejectGesture

func (r *SerialTapGestureRecognizer) RejectGesture(pointer int)

RejectGesture records that the pending tap lost, and resets the series.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.rejectGesture

type SerialTapGestureRecognizerOpts

type SerialTapGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	AllowedButtonsFilter AllowedButtonsFilter
}

SerialTapGestureRecognizerOpts are the optional parameters of NewSerialTapGestureRecognizer.

Flutter: gestures/multitap.dart SerialTapGestureRecognizer.new

type SerialTapUpDetails

type SerialTapUpDetails struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
	// Count is the number of the tap in the series, starting at 1.
	Count int
}

SerialTapUpDetails is the data of a tap of a series that ended.

Flutter: gestures/multitap.dart SerialTapUpDetails

func NewSerialTapUpDetails

func NewSerialTapUpDetails(opts ...SerialTapUpOpts) SerialTapUpDetails

NewSerialTapUpDetails creates the details.

Flutter: gestures/multitap.dart SerialTapUpDetails.new

func (SerialTapUpDetails) DebugFillProperties

func (d SerialTapUpDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/multitap.dart SerialTapUpDetails.debugFillProperties

func (SerialTapUpDetails) GetGlobalPosition

func (d SerialTapUpDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/multitap.dart SerialTapUpDetails.globalPosition

func (SerialTapUpDetails) GetLocalPosition

func (d SerialTapUpDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/multitap.dart SerialTapUpDetails.localPosition

type SerialTapUpOpts

type SerialTapUpOpts struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
	// Count is the number of the tap in the series; the default is 1.
	Count int
}

SerialTapUpOpts are the optional parameters of NewSerialTapUpDetails.

Flutter: gestures/multitap.dart SerialTapUpDetails.new

type SlopTolerance

type SlopTolerance struct {
	// contains filtered or unexported fields
}

SlopTolerance is how far a pointer may move before a recognizer gives up: the default (the touch slop of the device settings), no limit, or a distance in logical pixels. The zero value is the default.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.preAcceptSlopTolerance

func NewSlopTolerance

func NewSlopTolerance(distance float64) SlopTolerance

NewSlopTolerance is a limit of the distance, which must not be negative.

Flutter: gestures/recognizer.dart PrimaryPointerGestureRecognizer.new

type TapAndDragGestureRecognizerOpts

type TapAndDragGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	AllowedButtonsFilter AllowedButtonsFilter
	// NoEagerVictoryOnDrag makes the recognizer wait to win the arena by the
	// usual rules after a drag started, instead of claiming the win. Flutter's
	// eagerVictoryOnDrag is true by default.
	NoEagerVictoryOnDrag bool
}

TapAndDragGestureRecognizerOpts are the optional parameters of the tap and drag recognizers.

Flutter: gestures/tap_and_drag.dart BaseTapAndDragGestureRecognizer.new

type TapAndHorizontalDragGestureRecognizer

type TapAndHorizontalDragGestureRecognizer struct {
	BaseTapAndDragGestureRecognizer
}

TapAndHorizontalDragGestureRecognizer recognizes a tap, or a horizontal drag that starts with a tap.

Flutter: gestures/tap_and_drag.dart TapAndHorizontalDragGestureRecognizer

func NewTapAndHorizontalDragGestureRecognizer

func NewTapAndHorizontalDragGestureRecognizer(binding *GestureBinding, opts ...TapAndDragGestureRecognizerOpts) *TapAndHorizontalDragGestureRecognizer

NewTapAndHorizontalDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/tap_and_drag.dart TapAndHorizontalDragGestureRecognizer.new

type TapAndPanGestureRecognizer

type TapAndPanGestureRecognizer struct {
	BaseTapAndDragGestureRecognizer
}

TapAndPanGestureRecognizer recognizes a tap, or a drag in any direction that starts with a tap.

Flutter: gestures/tap_and_drag.dart TapAndPanGestureRecognizer

func NewTapAndPanGestureRecognizer

func NewTapAndPanGestureRecognizer(binding *GestureBinding, opts ...TapAndDragGestureRecognizerOpts) *TapAndPanGestureRecognizer

NewTapAndPanGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/tap_and_drag.dart TapAndPanGestureRecognizer.new

type TapDownDetails

type TapDownDetails struct {
	// GlobalPosition is where the pointer touched the screen, in global
	// coordinates.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device that touched the screen.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

TapDownDetails is the data of a pointer that touched the screen, which might be the start of a tap.

Flutter: gestures/tap.dart TapDownDetails

func NewTapDownDetails

func NewTapDownDetails(opts ...TapDownOpts) TapDownDetails

NewTapDownDetails creates the details.

Flutter: gestures/tap.dart TapDownDetails.new

func (TapDownDetails) DebugFillProperties

func (d TapDownDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap.dart TapDownDetails.debugFillProperties

func (TapDownDetails) GetGlobalPosition

func (d TapDownDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap.dart TapDownDetails.globalPosition

func (TapDownDetails) GetLocalPosition

func (d TapDownDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap.dart TapDownDetails.localPosition

func (TapDownDetails) String

func (d TapDownDetails) String() string

String describes the details.

Flutter: gestures/tap.dart TapDownDetails.toString

type TapDownOpts

type TapDownOpts struct {
	// GlobalPosition is where the pointer touched the screen.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
}

TapDownOpts are the optional parameters of NewTapDownDetails.

Flutter: gestures/tap.dart TapDownDetails.new

type TapDragDownDetails

type TapDragDownDetails struct {
	// GlobalPosition is where the pointer touched the screen.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
	// ConsecutiveTapCount is the number of taps of the series, including this
	// one.
	ConsecutiveTapCount int
}

TapDragDownDetails is the data of a pointer that touched the screen and might start a tap or a drag.

Flutter: gestures/tap_and_drag.dart TapDragDownDetails

func (TapDragDownDetails) DebugFillProperties

func (d TapDragDownDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap_and_drag.dart TapDragDownDetails.debugFillProperties

func (TapDragDownDetails) GetGlobalPosition

func (d TapDragDownDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap_and_drag.dart TapDragDownDetails.globalPosition

func (TapDragDownDetails) GetLocalPosition

func (d TapDragDownDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap_and_drag.dart TapDragDownDetails.localPosition

type TapDragEndDetails

type TapDragEndDetails struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Velocity is the velocity of the pointer.
	Velocity Velocity
	// PrimaryVelocity is the velocity along the primary axis, if there is one.
	PrimaryVelocity foundation.Opt[float64]
	// ConsecutiveTapCount is the number of taps of the series.
	ConsecutiveTapCount int
}

TapDragEndDetails is the data of a drag after a tap that ended.

Flutter: gestures/tap_and_drag.dart TapDragEndDetails

func (TapDragEndDetails) DebugFillProperties

func (d TapDragEndDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap_and_drag.dart TapDragEndDetails.debugFillProperties

func (TapDragEndDetails) GetGlobalPosition

func (d TapDragEndDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap_and_drag.dart TapDragEndDetails.globalPosition

func (TapDragEndDetails) GetLocalPosition

func (d TapDragEndDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap_and_drag.dart TapDragEndDetails.localPosition

type TapDragStartDetails

type TapDragStartDetails struct {
	// GlobalPosition is where the drag started.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// SourceTimeStamp is the time of the event that started the drag.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
	// ConsecutiveTapCount is the number of taps of the series.
	ConsecutiveTapCount int
}

TapDragStartDetails is the data of a drag that started after a tap.

Flutter: gestures/tap_and_drag.dart TapDragStartDetails

func (TapDragStartDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap_and_drag.dart TapDragStartDetails.debugFillProperties

func (TapDragStartDetails) GetGlobalPosition

func (d TapDragStartDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap_and_drag.dart TapDragStartDetails.globalPosition

func (TapDragStartDetails) GetLocalPosition

func (d TapDragStartDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap_and_drag.dart TapDragStartDetails.localPosition

type TapDragUpDetails

type TapDragUpDetails struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device.
	Kind ui.PointerDeviceKind
	// ConsecutiveTapCount is the number of taps of the series, including this
	// one.
	ConsecutiveTapCount int
}

TapDragUpDetails is the data of a tap that ended.

Flutter: gestures/tap_and_drag.dart TapDragUpDetails

func (TapDragUpDetails) DebugFillProperties

func (d TapDragUpDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap_and_drag.dart TapDragUpDetails.debugFillProperties

func (TapDragUpDetails) GetGlobalPosition

func (d TapDragUpDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap_and_drag.dart TapDragUpDetails.globalPosition

func (TapDragUpDetails) GetLocalPosition

func (d TapDragUpDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap_and_drag.dart TapDragUpDetails.localPosition

type TapDragUpdateDetails

type TapDragUpdateDetails struct {
	// GlobalPosition is the global position of the pointer.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// SourceTimeStamp is the time of the event.
	SourceTimeStamp foundation.Opt[time.Duration]
	// Delta is how far the pointer moved since the last update.
	Delta ui.Offset
	// PrimaryDelta is the delta along the primary axis, if the drag has one.
	PrimaryDelta foundation.Opt[float64]
	// Kind is the kind of device.
	Kind foundation.Opt[ui.PointerDeviceKind]
	// OffsetFromOrigin is how far the pointer is from where the drag started,
	// in global coordinates.
	OffsetFromOrigin ui.Offset
	// LocalOffsetFromOrigin is OffsetFromOrigin in the coordinates of the
	// target.
	LocalOffsetFromOrigin ui.Offset
	// ConsecutiveTapCount is the number of taps of the series.
	ConsecutiveTapCount int
}

TapDragUpdateDetails is the data of a pointer that moved during a drag after a tap.

Flutter: gestures/tap_and_drag.dart TapDragUpdateDetails

func (TapDragUpdateDetails) DebugFillProperties

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap_and_drag.dart TapDragUpdateDetails.debugFillProperties

func (TapDragUpdateDetails) GetGlobalPosition

func (d TapDragUpdateDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap_and_drag.dart TapDragUpdateDetails.globalPosition

func (TapDragUpdateDetails) GetLocalPosition

func (d TapDragUpdateDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap_and_drag.dart TapDragUpdateDetails.localPosition

type TapGestureRecognizer

type TapGestureRecognizer struct {
	BaseTapGestureRecognizer

	// OnTapDown is called when a pointer that might tap with the primary button
	// touches the screen.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTapDown
	OnTapDown GestureTapDownCallback
	// OnTapUp is called when a pointer taps with the primary button and is
	// lifted.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTapUp
	OnTapUp GestureTapUpCallback
	// OnTap is called after OnTapUp, when the primary button taps.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTap
	OnTap GestureTapCallback
	// OnTapMove is called when the pointer moves while a tap with the primary
	// button is possible.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTapMove
	OnTapMove GestureTapMoveCallback
	// OnTapCancel is called when the pointer that sent OnTapDown will not tap.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTapCancel
	OnTapCancel GestureTapCancelCallback
	// OnSecondaryTap is called when the secondary button taps.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onSecondaryTap
	OnSecondaryTap GestureTapCallback
	// OnSecondaryTapDown is called when a pointer that might tap with the
	// secondary button touches the screen.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onSecondaryTapDown
	OnSecondaryTapDown GestureTapDownCallback
	// OnSecondaryTapUp is called when the secondary button taps and is
	// lifted.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onSecondaryTapUp
	OnSecondaryTapUp GestureTapUpCallback
	// OnSecondaryTapCancel is called when the pointer that sent
	// OnSecondaryTapDown will not tap.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onSecondaryTapCancel
	OnSecondaryTapCancel GestureTapCancelCallback
	// OnTertiaryTapDown is called when a pointer that might tap with the
	// tertiary button touches the screen.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTertiaryTapDown
	OnTertiaryTapDown GestureTapDownCallback
	// OnTertiaryTapUp is called when the tertiary button taps and is lifted.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTertiaryTapUp
	OnTertiaryTapUp GestureTapUpCallback
	// OnTertiaryTapCancel is called when the pointer that sent
	// OnTertiaryTapDown will not tap.
	//
	// Flutter: gestures/tap.dart TapGestureRecognizer.onTertiaryTapCancel
	OnTertiaryTapCancel GestureTapCancelCallback
}

TapGestureRecognizer recognizes taps: a primary, secondary or tertiary button that goes down and up again without the pointer moving much. Set the callbacks of the buttons to listen for; a pointer whose button has no callback is not allowed.

Flutter: gestures/tap.dart TapGestureRecognizer

func NewTapGestureRecognizer

func NewTapGestureRecognizer(binding *GestureBinding, opts ...TapGestureRecognizerOpts) *TapGestureRecognizer

NewTapGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/tap.dart TapGestureRecognizer.new

func (*TapGestureRecognizer) DebugDescription

func (r *TapGestureRecognizer) DebugDescription() string

DebugDescription is "tap".

Flutter: gestures/tap.dart TapGestureRecognizer.debugDescription

func (*TapGestureRecognizer) HandleTapCancel

func (r *TapGestureRecognizer) HandleTapCancel(down *PointerDownEvent, _ *PointerCancelEvent, reason string)

HandleTapCancel calls the tap cancel callback of the button.

Flutter: gestures/tap.dart TapGestureRecognizer.handleTapCancel

func (*TapGestureRecognizer) HandleTapDown

func (r *TapGestureRecognizer) HandleTapDown(down *PointerDownEvent)

HandleTapDown calls the tap down callback of the button.

Flutter: gestures/tap.dart TapGestureRecognizer.handleTapDown

func (*TapGestureRecognizer) HandleTapMove

func (r *TapGestureRecognizer) HandleTapMove(move *PointerMoveEvent)

HandleTapMove calls OnTapMove for a move with the primary button.

Flutter: gestures/tap.dart TapGestureRecognizer.handleTapMove

func (*TapGestureRecognizer) HandleTapUp

func (r *TapGestureRecognizer) HandleTapUp(down *PointerDownEvent, up *PointerUpEvent)

HandleTapUp calls the tap up and tap callbacks of the button.

Flutter: gestures/tap.dart TapGestureRecognizer.handleTapUp

func (*TapGestureRecognizer) IsPointerAllowed

func (r *TapGestureRecognizer) IsPointerAllowed(event *PointerDownEvent) bool

IsPointerAllowed allows a pointer whose button has a callback.

Flutter: gestures/tap.dart TapGestureRecognizer.isPointerAllowed

type TapGestureRecognizerOpts

type TapGestureRecognizerOpts struct {
	// DebugOwner is the object that owns the recognizer.
	DebugOwner any
	// SupportedDevices are the kinds of pointer the recognizer accepts; nil for
	// all.
	SupportedDevices []ui.PointerDeviceKind
	// AllowedButtonsFilter says whether the buttons of a pointer are allowed.
	AllowedButtonsFilter AllowedButtonsFilter
	// PreAcceptSlopTolerance is how far the pointer may move before the
	// recognizer wins the arena without it giving up.
	PreAcceptSlopTolerance SlopTolerance
	// PostAcceptSlopTolerance is how far the pointer may move after the
	// recognizer won.
	PostAcceptSlopTolerance SlopTolerance
}

TapGestureRecognizerOpts are the optional parameters of NewTapGestureRecognizer.

Flutter: gestures/tap.dart TapGestureRecognizer.new

type TapMoveDetails

type TapMoveDetails struct {
	// GlobalPosition is the global position of the pointer.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device.
	Kind ui.PointerDeviceKind
	// Delta is how far the pointer moved since the last event.
	Delta ui.Offset
}

TapMoveDetails is the data of a pointer that moved while a tap was possible.

Flutter: gestures/tap.dart TapMoveDetails

func NewTapMoveDetails

func NewTapMoveDetails(kind ui.PointerDeviceKind, opts ...TapMoveOpts) TapMoveDetails

NewTapMoveDetails creates the details for a device of the kind.

Flutter: gestures/tap.dart TapMoveDetails.new

type TapMoveOpts

type TapMoveOpts struct {
	// GlobalPosition is the global position of the pointer.
	GlobalPosition ui.Offset
	// Delta is how far the pointer moved.
	Delta ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
}

TapMoveOpts are the optional parameters of NewTapMoveDetails.

Flutter: gestures/tap.dart TapMoveDetails.new

type TapUpDetails

type TapUpDetails struct {
	// GlobalPosition is where the pointer was lifted, in global coordinates.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target.
	LocalPosition ui.Offset
	// Kind is the kind of device that tapped.
	Kind ui.PointerDeviceKind
}

TapUpDetails is the data of a pointer that stopped touching the screen to end a tap.

Flutter: gestures/tap.dart TapUpDetails

func NewTapUpDetails

func NewTapUpDetails(kind ui.PointerDeviceKind, opts ...TapUpOpts) TapUpDetails

NewTapUpDetails creates the details for a tap of a device of the kind.

Flutter: gestures/tap.dart TapUpDetails.new

func (TapUpDetails) DebugFillProperties

func (d TapUpDetails) DebugFillProperties(p *foundation.DiagnosticPropertiesBuilder)

DebugFillProperties adds the properties of the details.

Flutter: gestures/tap.dart TapUpDetails.debugFillProperties

func (TapUpDetails) GetGlobalPosition

func (d TapUpDetails) GetGlobalPosition() ui.Offset

GetGlobalPosition is GlobalPosition.

Flutter: gestures/tap.dart TapUpDetails.globalPosition

func (TapUpDetails) GetLocalPosition

func (d TapUpDetails) GetLocalPosition() ui.Offset

GetLocalPosition is LocalPosition.

Flutter: gestures/tap.dart TapUpDetails.localPosition

func (TapUpDetails) String

func (d TapUpDetails) String() string

String describes the details.

Flutter: gestures/tap.dart TapUpDetails.toString

type TapUpOpts

type TapUpOpts struct {
	// GlobalPosition is where the pointer was lifted.
	GlobalPosition ui.Offset
	// LocalPosition is the position in the coordinates of the target; the
	// default is GlobalPosition.
	LocalPosition foundation.Opt[ui.Offset]
}

TapUpOpts are the optional parameters of NewTapUpDetails.

Flutter: gestures/tap.dart TapUpDetails.new

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

Timer is a function that runs once, a while from now, on the UI thread.

Flutter: dart:async Timer

func (*Timer) Cancel

func (t *Timer) Cancel()

Cancel stops the timer if it did not run yet.

Flutter: dart:async Timer.cancel

func (*Timer) IsActive

func (t *Timer) IsActive() bool

IsActive reports whether the timer has not run or been cancelled.

Flutter: dart:async Timer.isActive

type TransformDeltaViaPositionsOpts

type TransformDeltaViaPositionsOpts struct {
	// TransformedEndPosition is the end position already transformed; if it
	// is None the function transforms it.
	TransformedEndPosition foundation.Opt[ui.Offset]
}

TransformDeltaViaPositionsOpts are the optional parameters of TransformDeltaViaPositions.

Flutter: gestures/events.dart PointerEvent.transformDeltaViaPositions

type Velocity

type Velocity struct {
	// PixelsPerSecond is the number of pixels per second in each direction.
	//
	// Flutter: gestures/velocity_tracker.dart Velocity.pixelsPerSecond
	PixelsPerSecond ui.Offset
}

Velocity is a velocity in two dimensions, in logical pixels per second.

Flutter: gestures/velocity_tracker.dart Velocity

func NewVelocity

func NewVelocity(pixelsPerSecond ui.Offset) Velocity

NewVelocity creates a velocity.

Flutter: gestures/velocity_tracker.dart Velocity.new

func (Velocity) Add

func (v Velocity) Add(other Velocity) Velocity

Add returns the sum of the velocities.

Flutter: gestures/velocity_tracker.dart Velocity.operator+

func (Velocity) ClampMagnitude

func (v Velocity) ClampMagnitude(minValue, maxValue float64) Velocity

ClampMagnitude returns the velocity with its speed limited to the range [minValue, maxValue], in the same direction. The bounds must be zero or more and maxValue not less than minValue, or a debug build panics with the tag VelocityBoundsInvalid.

Flutter: gestures/velocity_tracker.dart Velocity.clampMagnitude

func (Velocity) Neg

func (v Velocity) Neg() Velocity

Neg returns the velocity in the opposite direction.

Flutter: gestures/velocity_tracker.dart Velocity.operator-

func (Velocity) String

func (v Velocity) String() string

String describes the velocity.

Flutter: gestures/velocity_tracker.dart Velocity.toString

func (Velocity) Sub

func (v Velocity) Sub(other Velocity) Velocity

Sub returns the velocity minus other.

Flutter: gestures/velocity_tracker.dart Velocity.operator-

type VelocityEstimate

type VelocityEstimate struct {
	// PixelsPerSecond is the number of pixels per second in each direction.
	PixelsPerSecond ui.Offset
	// Confidence is the confidence of the estimate, from 0 to 1.
	Confidence float64
	// Duration is the time the samples span.
	Duration time.Duration
	// Offset is the distance the samples span.
	Offset ui.Offset
}

VelocityEstimate is an estimate of a velocity from the positions of a pointer, with how reliable it is.

Flutter: gestures/velocity_tracker.dart VelocityEstimate

func (VelocityEstimate) String

func (e VelocityEstimate) String() string

String describes the estimate.

Flutter: gestures/velocity_tracker.dart VelocityEstimate.toString

type VelocityTracker

type VelocityTracker struct {
	// contains filtered or unexported fields
}

VelocityTracker computes the velocity of a pointer from its positions. A recognizer feeds it the positions and asks for the velocity when the pointer is lifted.

The three kinds of tracker of Flutter are one type here, chosen by the constructor: NewVelocityTrackerWithKind fits a polynomial to the last samples; NewIOSScrollViewFlingVelocityTracker and NewMacOSScrollViewFlingVelocityTracker estimate the fling velocity of an iOS or macOS scroll view.

Deviation: Flutter's trackers are classes that extend VelocityTracker; Go's is one type with a mode (SPEC §12.10).

Flutter: gestures/velocity_tracker.dart VelocityTracker

func NewIOSScrollViewFlingVelocityTracker

func NewIOSScrollViewFlingVelocityTracker(clock SamplingClock, kind ui.PointerDeviceKind) *VelocityTracker

NewIOSScrollViewFlingVelocityTracker creates a tracker that estimates the velocity the way an iOS scroll view does.

Flutter: gestures/velocity_tracker.dart IOSScrollViewFlingVelocityTracker.new

func NewMacOSScrollViewFlingVelocityTracker

func NewMacOSScrollViewFlingVelocityTracker(clock SamplingClock, kind ui.PointerDeviceKind) *VelocityTracker

NewMacOSScrollViewFlingVelocityTracker creates a tracker that estimates the velocity the way a macOS scroll view does.

Flutter: gestures/velocity_tracker.dart MacOSScrollViewFlingVelocityTracker.new

func NewVelocityTrackerWithKind

func NewVelocityTrackerWithKind(clock SamplingClock, kind ui.PointerDeviceKind) *VelocityTracker

NewVelocityTrackerWithKind creates a tracker for pointers of the kind. The clock tells how long ago the last position was added: with no recent sample, the velocity is zero.

Flutter: gestures/velocity_tracker.dart VelocityTracker.withKind

func (*VelocityTracker) AddPosition

func (t *VelocityTracker) AddPosition(tm time.Duration, position ui.Offset)

AddPosition adds a position at a time. The times must not go back.

Flutter: gestures/velocity_tracker.dart VelocityTracker.addPosition

func (*VelocityTracker) GetVelocity

func (t *VelocityTracker) GetVelocity() Velocity

GetVelocity returns the velocity, which is zero if no estimate can be made.

Flutter: gestures/velocity_tracker.dart VelocityTracker.getVelocity

func (*VelocityTracker) GetVelocityEstimate

func (t *VelocityTracker) GetVelocityEstimate() foundation.Opt[VelocityEstimate]

GetVelocityEstimate returns the estimate of the velocity, or None if there is no sample. If the last sample is older than 40 ms the estimate is zero.

Flutter: gestures/velocity_tracker.dart VelocityTracker.getVelocityEstimate

func (*VelocityTracker) Kind

Kind is the kind of pointer the tracker is for.

Flutter: gestures/velocity_tracker.dart VelocityTracker.kind

type VerticalDragGestureRecognizer

type VerticalDragGestureRecognizer struct{ DragGestureRecognizer }

VerticalDragGestureRecognizer recognizes movement in the vertical direction.

Flutter: gestures/monodrag.dart VerticalDragGestureRecognizer

func NewVerticalDragGestureRecognizer

func NewVerticalDragGestureRecognizer(binding *GestureBinding, opts ...DragGestureRecognizerOpts) *VerticalDragGestureRecognizer

NewVerticalDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/monodrag.dart VerticalDragGestureRecognizer.new

type VerticalMultiDragGestureRecognizer

type VerticalMultiDragGestureRecognizer struct{ MultiDragGestureRecognizer }

VerticalMultiDragGestureRecognizer starts a drag as soon as a pointer moves past the slop vertically.

Flutter: gestures/multidrag.dart VerticalMultiDragGestureRecognizer

func NewVerticalMultiDragGestureRecognizer

func NewVerticalMultiDragGestureRecognizer(binding *GestureBinding, opts ...MultiDragGestureRecognizerOpts) *VerticalMultiDragGestureRecognizer

NewVerticalMultiDragGestureRecognizer creates a recognizer that works with the binding.

Flutter: gestures/multidrag.dart VerticalMultiDragGestureRecognizer.new

func (*VerticalMultiDragGestureRecognizer) CreateNewPointerState

CreateNewPointerState makes the state of the pointer.

Flutter: gestures/multidrag.dart VerticalMultiDragGestureRecognizer.createNewPointerState

func (*VerticalMultiDragGestureRecognizer) DebugDescription

func (r *VerticalMultiDragGestureRecognizer) DebugDescription() string

DebugDescription is "vertical multidrag".

Flutter: gestures/multidrag.dart VerticalMultiDragGestureRecognizer.debugDescription

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL