DisplayConfig class
Override config applied while an Origin is displayed (active on stage).
All fields nullable. When unset, the runtime cascade falls back to the Origin's own configuration, then to the enclosing Stage's defaults, then to hardcoded library defaults. Per-key cascade for maps; per-field for constraints.
Constructors
-
DisplayConfig({Map<
DragStart, DragGesture> ? drag, Map<ScaleStart, ScaleGesture> ? scale, GestureConstraints? constraints, OnRelease? onRelease, OnStageTap? onTap, OnStageTap? onDoubleTap, double? doubleTapPullFactor, DragPromote? dragPromote, double? scaleVelocityCancel, CropConfig? crop, WidgetBuilder? overlay, OriginRect? display, OriginRect? displayContainer, Overrides? overrides, StageBuilder? builder, VoidCallback? onTapOutside}) -
const
Properties
- builder → StageBuilder?
-
Per-mode wrap of the captured widget. Resolved in the cascade
gesture.bounds.builder > gesture.builder > displayConfig > Origin.builder.
Use this to layer mode-specific visual content over the captured widget
(e.g. a picker chrome that crossfades between an icon and a button row
as the rect interpolates from origin to base). Taps inside the builder
are absorbed by Stage's gesture detector — interactive tap targets
belong in overlay or in a position-dispatching onTap.
final
- constraints → GestureConstraints?
-
final
- crop → CropConfig?
-
Cropper tool configuration. When non-null and a
Cropperwidget is present in the displayed view's tree, the cropper renders its UI and owns 1-finger gestures. Different modes can have differentCropConfigs (e.g.,'crop_square'locks aspect ratio,'crop_free'allows any).final - display → OriginRect?
-
Optional display rect override. Resolved in the cascade
mode > displayConfig > Origin.display. Use this on a mode to
constrain the displayed item's rect (e.g., shrink so it doesn't run
under an appbar that's only present in this mode).
final
- displayContainer → OriginRect?
-
Optional display container override. Resolved in the cascade
mode > displayConfig > Origin.displayContainer.
final
- doubleTapPullFactor → double?
-
Tunes the panning behavior of the default at-base double-tap (passed to
RectExt.fitCoverRect as
pullFactor).0= under-finger,1= max edge attraction. Cascade: displayConfig > stage > package default.final -
drag
→ Map<
DragStart, DragGesture> ? -
final
- dragPromote → DragPromote?
-
Cascade fallback for displayed-state drag→scale promotion. Resolved as:
gesture > displayConfig > stage > DragPromote.scale default.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDoubleTap → OnStageTap?
-
Cascade fallback for displayed-state double-tap. Resolved as:
displayConfig > stage > package default (toggle baseRect ↔ fit-cover).
final
- onRelease → OnRelease?
-
Cascade fallback for Gesture.onRelease while the origin is displayed.
Resolved as: gesture > displayConfig > stage > package default.
final
- onTap → OnStageTap?
-
Cascade fallback for displayed-state single-tap. Resolved as:
displayConfig > stage > package default (no-op). Use this to react to
taps on the displayed view — e.g. toggle a chrome overlay when the tap
is StageTapEvent.insideRect, dismiss otherwise.
final
- onTapOutside → VoidCallback?
-
Fires when the user taps the scrim (the dim area outside the captured
rect). Lives on the scrim's own GestureDetector, not Stage's
TapGestureRecognizer, so it doesn't compete in the gesture arena
with GestureDetectors inside the captured widget tree. Pair this
with no onTap when the captured widget hosts its own interactive
children that need to win their taps.
final
- overlay → WidgetBuilder?
-
Optional overlay builder for this DisplayConfig. Resolved in the
cascade: mode > displayConfig > Origin.overlay > Stage.overlay.
Set on a mode to swap in a tool-specific appbar (e.g., crop toolbar)
only when that mode is active.
final
- overrides → Overrides?
-
Cascade fallback for Stage.overrides/Origin.overrides while the
origin is displayed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scale
→ Map<
ScaleStart, ScaleGesture> ? -
final
- scaleVelocityCancel → double?
-
Cascade fallback for scale-velocity-based translation cancellation in
[0, 1]. Resolved as: gesture > displayConfig > stage > 0.5 default.final
Methods
-
merge(
DisplayConfig? override) → DisplayConfig -
Returns a new DisplayConfig where each non-null field of
overridereplaces the corresponding field ofthis. Null fields inoverridekeep the value fromthis. Used to apply mode-specific configs on top of the defaultDisplayConfig— see Origin.modes. -
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