Origin class
- Inheritance
Constructors
-
Origin({Key? key, required Object tag, StageTap? onTap, StageTap? onDoubleTap, StageTap? onLongPress, BorderRadius borderRadius = .zero, Object? containerTag, OriginRect? originContainer, OriginRect? display, OriginRect? displayContainer, Map<
DragStart, DragGesture> ? drag, Map<ScaleStart, ScaleGesture> ? scale, GestureConstraints? constraints, DisplayConfig? displayConfig, Map<Object, DisplayConfig> ? modes, double? aspectRatio, Color? backgroundColor, OnRelease? onRelease, Overrides? overrides, FutureOr<void> onEnd(StageData)?, Set<Object> ? swapTags, ValueSetter<Object> ? onSwap, StageBuilder? builder, DragHybrid? dragHybridFromStage, ScaleHybrid? scaleHybridFromStage, double? scaleVelocityCancel, WidgetBuilder? overlay, required Widget child}) -
const
Properties
- aspectRatio → double?
-
final
- backgroundColor → Color?
-
final
- borderRadius → BorderRadius
-
final
- builder → StageBuilder?
-
final
- child → Widget
-
final
- constraints → GestureConstraints?
-
final
- containerTag → Object?
-
final
- display → OriginRect?
-
final
- displayConfig → DisplayConfig?
-
final
- displayContainer → OriginRect?
-
final
-
drag
→ Map<
DragStart, DragGesture> ? -
final
- dragHybridFromStage → DragHybrid?
-
Origin-level cascade fallback for how new pointers are handled during
an active gesture on this Origin (see DragGesture.hybridFromStage /
ScaleGesture.hybridFromStage for per-gesture overrides). Resolved
after the per-gesture field, before Stage.dragHybridFromStage /
Stage.scaleHybridFromStage and the DragHybrid.lock / ScaleHybrid.lock
package default.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
modes
→ Map<
Object, DisplayConfig> ? -
Mode-specific DisplayConfig variants, looked up by key when
event.animateToBase(modeKey)is called.final - onDoubleTap → StageTap?
-
Optional double-tap handler. Mirrors onTap — same TapEvent shape,
consumer decides what to do (open, run effect, etc.). Registering this
adds a DoubleTapGestureRecognizer alongside the tap recognizer, so
single-tap resolution incurs the standard double-tap timeout (~300ms).
final
-
onEnd
→ FutureOr<
void> Function(StageData)? -
final
- onLongPress → StageTap?
-
Optional long-press handler. Mirrors onTap.
final
- onRelease → OnRelease?
-
final
-
onSwap
→ ValueSetter<
Object> ? -
final
- onTap → StageTap?
-
final
- originContainer → OriginRect?
-
final
- overlay → WidgetBuilder?
-
Origin-level overlay builder. Resolved in the cascade
mode > displayConfig > this > Stage.overlay. Only rendered while
this Origin is the displayed one on Stage.
final
- overrides → Overrides?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scale
→ Map<
ScaleStart, ScaleGesture> ? -
final
- scaleHybridFromStage → ScaleHybrid?
-
final
- scaleVelocityCancel → double?
-
Origin-level cascade fallback for scale-velocity-based translation
cancellation. Resolved between Gesture.scaleVelocityCancel /
DisplayConfig.scaleVelocityCancel and Stage.scaleVelocityCancel.
final
-
swapTags
→ Set<
Object> ? -
final
- tag → Object
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Origin> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isActiveOf(
BuildContext context) → bool -
isInteractingOf(
BuildContext context) → bool -
True iff the enclosing Origin's tag is currently active on stage and
Stage's recognizer has at least one pointer down. Child widgets that
live in the Origin's subtree can read this without knowing their tag.
Resolves to false when no
_OriginDatais in scope. -
measureOf(
BuildContext context) → OriginRect? -
tagOf(
BuildContext context) → Object?