DisplacementEvent<R> class
abstract
Base class for events that contain two points on the screen, representing some sort of movement (from a "start" to and "end") and having a "delta". These include: drag events and (in the future) pointer move events.
This class includes properties that describe both positions where the event has occurred (start and end) and the delta (i.e. displacement) represented by the event.
- Inheritance
-
- Object
- Event<
R> - LocationContextEvent<
DisplacementContext, R> - DisplacementEvent
- Implementers
Constructors
- DisplacementEvent(Game _game, {required R raw, required Vector2 deviceStartPosition, required Vector2 deviceEndPosition})
Properties
- canvasDelta → Vector2
-
Event delta in the coordinate space of the game widget, i.e.
relative to the game canvas.
latefinal
- canvasEndPosition → Vector2
-
Event end position in the coordinate space of the game widget, i.e.
relative to the game canvas.
latefinal
- canvasStartPosition → Vector2
-
Event start position in the coordinate space of the game widget, i.e.
relative to the game canvas.
latefinal
- continuePropagation ↔ bool
-
If this flag is false (default), the event will be delivered to the first
component that can handle it. If that component sets this flag to true,
the event will propagate further down the component tree to other eligible
components.
getter/setter pairinherited
- deviceDelta → Vector2
-
Event delta in the coordinate space of the device -- either the
phone, or the browser window, or the app.
latefinal
- deviceEndPosition → Vector2
-
Event end position in the coordinate space of the device -- either the
phone, or the browser window, or the app.
final
- deviceStartPosition → Vector2
-
Event start position in the coordinate space of the device -- either the
phone, or the browser window, or the app.
final
- handled ↔ bool
-
Flag that can be used to indicate that the event was handled by one of the
components.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- localDelta → Vector2
-
Event delta in the local coordinate space of the current component.
no setter
- localEndPosition → Vector2
-
Event end position in the local coordinate space of the current
component.
no setter
- localStartPosition → Vector2
-
Event start position in the local coordinate space of the current
component.
no setter
- parentContext → DisplacementContext?
-
The context in the parent's coordinate space, containing start and end
points.
no setterinherited
- raw ↔ R
-
The original Flutter raw event that triggered this Flame event.
getter/setter pairinherited
-
renderingTrace
→ List<
DisplacementContext> -
The stacktrace of coordinates of the event within the components in their
rendering order.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
collectApplicableChildren(
{required Component rootComponent}) → Iterable< Component> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited