WidgetNodeTransformerManager class abstract
A wrapper class for both PassiveNodeTransformerManager and
ActiveNodeTransformerManager.
Helps separate the functions that are common between them into one place.
- Inheritance
-
- Object
- NodeTransformerManager<
Widget, BuildContext, WidgetBuildSettings, NodeWidgetTransformer< BaseNode> > - WidgetNodeTransformerManager
- Implementers
Constructors
- WidgetNodeTransformerManager(GetNode getNode, LayoutRetrieverBuilder layoutRetrievalBuilder)
Properties
- buildsHeroes ↔ bool
-
Whether nodes with a hero tag are built as shared elements (Flutter
Heros) that fly between screens. True at runtime; a design canvas
turns it off, where a node is drawn as designed and nothing navigates.
getter/setter pair
- decorator ↔ NodeBuildDecorator?
-
Wraps every node this manager builds, when set. See
NodeBuildDecorator.
getter/setter pair
- getNode → GetNode
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- layoutRetrievalBuilder → LayoutRetrieverBuilder
-
Returns a widget that decides how to load nested layouts of a rendered
node.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyHero(
BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget -
Wraps
widgetin a Hero whennodeis a shared element: it has a hero tag (BaseNode.heroTagor aheroTagbinding) that resolves to non-empty text withscopedValues(by default those ofcontext), and it is visible. See NodeHero. Does nothing when buildsHeroes is false. -
applyLoopAnimation(
BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget -
Runs the
BaseNode.loopAnimationofnodeonwidget, if it has one. -
applyNodePlay(
BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget -
Plays
node's one-shotEffectAnimations andParticleEmitteron their cues, and flies it in by itsBaseNode.flightKey. Nothing plays under a disabled TickerMode (the design canvas). -
applyReveal(
BuildContext context, BaseNode node, Widget widget) → Widget -
Scrolls
nodeinto view as itsBaseNode.revealsays. -
applySizeTransition(
BaseNode node, Widget widget) → Widget -
Animates
widgettonode's new size when it changes, with the node'sBaseNode.sizeTransition; see NodeSizeTransition. A node with a set size on an axis is laid out at each size in between there; one that hugs its content on an axis is revealed or hidden by its box. -
applyStrokePath(
BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget -
Draws
node'sBaseNode.strokePathin its box. -
applyTrackPose(
BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget -
Draws
nodewhere its drag track puts it for its variable's value, without making it draggable: how the design canvas shows a knob or a fader cap. Returnswidgetfor a node without a track. -
applyWidgetBlurs(
BaseNode node, Widget widget) → Widget -
Draws
node's visible blur effects aroundwidget: a background blur (frosted glass) blurs whatever is painted behind the node, clipped to its corner radius, and a layer blur blurs the node itself. An effect's radius is the Gaussian sigma, as CSSblur()and Flutter'sImageFilter.blurtake it. -
applyWidgetConstraints(
BaseNode node, Widget widget) → Widget - Convenience method to handle widget constraints.
-
applyWidgetMargins(
BaseNode node, Widget widget) → Widget - Convenience method to handle widget margins.
-
applyWidgetMotion(
BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues, bool animate = true}) → Widget -
Draws
widgetwithnode's motion: its transform, transitions and spin.animatefalse (the design canvas) shows the values without animating or spinning. -
applyWidgetOpacity(
BaseNode node, Widget widget) → Widget - Convenience method to handle widget opacity.
-
applyWidgetRotation(
BuildContext context, BaseNode node, Widget widget) → Widget - Convenience method to handle widget rotation.
-
applyWidgetVisibility(
BuildContext context, BaseNode node, Widget widget, {required bool maintainState, ScopedValues? scopedValues}) → Widget - Convenience method to handle widget visibility.
-
buildWidgetByID(
String id, BuildContext context, {required WidgetBuildSettings settings}) → Widget -
Will convert a
T(probablyBaseNode) to aK(probably Widget). Managers can do whatever they want here. This is where they normally wrap the widget with interaction for example.inherited -
buildWidgetFromNode(
BaseNode node, BuildContext context, {required WidgetBuildSettings settings}) → Widget -
Will convert a
BaseNodeto anO(probably Widget).inherited -
decorate(
BuildContext context, BaseNode node, Widget widget, NodeBuildLayer layer) → Widget -
Returns
widgetwrapped by decorator atlayer, orwidgetwhen no decorator is set. -
getBorderRadius(
BaseNode node) → BorderRadius? -
getClipBehavior(
BaseNode node) → Clip -
getTransformer<
L> () → L -
A convenience method that pulls the relevant transformer by its
type.inherited -
getTransformerByID(
String id) → NodeWidgetTransformer< BaseNode> -
Get a transformer from a given node type key.
inherited
-
getTransformerByNode(
BaseNode node) → NodeWidgetTransformer< BaseNode> -
Get a transformer from a given
node's type.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerAllTransformers(
Map< String, NodeWidgetTransformer< transformers) → voidBaseNode> > -
Registers a map of transformers in the registry.
inherited
-
registerTransformer(
String key, NodeWidgetTransformer< BaseNode> transformer) → void -
Registers a transformer in the registry.
The key must match the node
BaseNode.type. NT is an instance of the NodeTypeTransformer to register.inherited -
runtimeVisibility(
BuildContext context, BaseNode node, {ScopedValues? scopedValues}) → bool? -
Returns the visibility a condition or variable gives
nodeat runtime, or null when nothing overrides the node's own visibility. -
toString(
) → String -
A string representation of this object.
inherited
-
tryGetNode(
String id) → BaseNode? -
wrapWithCursorReactions(
BuildContext context, BaseNode node, Widget widget) → Widget -
Runs the
TriggerType.cursorEnter,TriggerType.cursorExitandTriggerType.hoverreactions ofnodewhen a mouse cursor enters, leaves or moves over it. -
wrapWithDoubleTap(
BuildContext context, BaseNode node, Widget widget) → Widget -
Runs
node's double tap reactions. -
wrapWithDrag(
BuildContext context, BaseNode node, Widget child) → Widget -
Makes
nodedraggable when it has aBaseNode.drag: it follows the pointer and springs back, stays or flies off (see NodeDrag). Flying off fires the node's swipe reaction for that direction; letting go fires its drag end reactions.childis the node's whole build, so its own bindings and its children read the drag asdrag. -
wrapWithInteractionScopes(
BuildContext context, BaseNode node, Widget child) → Widget -
Wraps the whole build of a
nodewith hold reactions so they run once it has been held, sharing the progress ashold.childbuilds the node below the scope so the node's own bindings see it too. -
wrapWithReaction(
BuildContext context, BaseNode node, Widget widget) → Widget - Convenience method to handle widget reactions.
-
wrapWithSemantics(
BaseNode node, Widget widget) → Widget - Tells screen readers that a tappable node is a button. A node with text inside reads as that text; one without (an icon button) reads as its node name, or its icon's name when the node still has a default name.
-
wrapWithSwipes(
BuildContext context, BaseNode node, Widget widget) → Widget -
Runs
node's swipe reactions when it is swiped, or scrolled with a mouse wheel (scrolling down swipes up, as content moves up). -
wrapWithViewportReactions(
BuildContext context, BaseNode node, Widget widget) → Widget -
Runs
node'sTriggerType.enterViewportandTriggerType.exitViewportreactions when it scrolls into and out of view; see ViewportReactionsBox.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
evaluateConditionText(
String text, ScopedValues scopedValues) → bool? -
Whether the condition
text(a${...}path or${= ...}formula, ortrue/false) holds withscopedValues. Empty text is null. -
motionLoopOf(
Object? value, {required MotionLoop saved}) → MotionLoop? -
The loop a
motion.loopbinding'svalueasks for:none,restartorreverseby name; true (or on) keepssaved, or loops back and forth whensavedis none; false, off, 0 or empty text is none. Null (keepsaved) for anything else, such as an unresolved binding. -
resolveMotion(
BaseNode node, {required ScopedValues scopedValues, bool animate = true}) → MotionModel? -
The motion
nodeshows now: itsBaseNode.motionwith the values bound throughmotion.<name>variables resolved fromscopedValues, the settings inMotionModel.settings(duration, delay, curve), andmotion.replayKeyandmotion.pulseKeyresolved to text. Withanimate(the running app), amotion.loopbinding switches the loop (seeMotionModel.loopProperty); the design canvas ignores it. Null when the node doesn't move. -
semanticLabelFor(
BaseNode node, List< BaseNode> descendants) → String -
The name a screen reader announces for
nodewhen it has no text. -
Writes a drag's live
valuesinto the variable namedname, so nodes outside the dragged one can follow it (seeDragModel.shareAs). -
wrapWithPointerReactions(
BuildContext context, BaseNode node, Widget widget) → Widget -
Fires
node's pointer down and pointer up reactions, such as a press and hold that starts on down and is cancelled on up. A cancelled pointer (a scroll took over) counts as up. The pointer is only listened to, so taps still reach the widget. -
writeDragOffset(
BuildContext context, String name, double offset) → void -
Writes
offset, a drag's distance from rest along one axis rounded to hundredths, into the number variablename(seeDragModel.xVariable). Does nothing for an empty name, a missing or computed variable, or an unchanged value.