WidgetNodeTransformerManager class abstract

A wrapper class for both PassiveNodeTransformerManager and ActiveNodeTransformerManager.

Helps separate the functions that are common between them into one place.

Inheritance
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 widget in a Hero when node is a shared element: it has a hero tag (BaseNode.heroTag or a heroTag binding) that resolves to non-empty text with scopedValues (by default those of context), 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.loopAnimation of node on widget, if it has one.
applyNodePlay(BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget
Plays node's one-shot EffectAnimations and ParticleEmitter on their cues, and flies it in by its BaseNode.flightKey. Nothing plays under a disabled TickerMode (the design canvas).
applyReveal(BuildContext context, BaseNode node, Widget widget) → Widget
Scrolls node into view as its BaseNode.reveal says.
applySizeTransition(BaseNode node, Widget widget) → Widget
Animates widget to node's new size when it changes, with the node's BaseNode.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's BaseNode.strokePath in its box.
applyTrackPose(BuildContext context, BaseNode node, Widget widget, {ScopedValues? scopedValues}) → Widget
Draws node where 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. Returns widget for a node without a track.
applyWidgetBlurs(BaseNode node, Widget widget) → Widget
Draws node's visible blur effects around widget: 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 CSS blur() and Flutter's ImageFilter.blur take 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 widget with node's motion: its transform, transitions and spin. animate false (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 (probably BaseNode) to a K (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 BaseNode to an O (probably Widget).
inherited
decorate(BuildContext context, BaseNode node, Widget widget, NodeBuildLayer layer) → Widget
Returns widget wrapped by decorator at layer, or widget when 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<BaseNode>> transformers) → void
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 node at 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.cursorExit and TriggerType.hover reactions of node when 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 node draggable when it has a BaseNode.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. child is the node's whole build, so its own bindings and its children read the drag as drag.
wrapWithInteractionScopes(BuildContext context, BaseNode node, Widget child) → Widget
Wraps the whole build of a node with hold reactions so they run once it has been held, sharing the progress as hold. child builds 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's TriggerType.enterViewport and TriggerType.exitViewport reactions 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, or true/false) holds with scopedValues. Empty text is null.
motionLoopOf(Object? value, {required MotionLoop saved}) → MotionLoop?
The loop a motion.loop binding's value asks for: none, restart or reverse by name; true (or on) keeps saved, or loops back and forth when saved is none; false, off, 0 or empty text is none. Null (keep saved) for anything else, such as an unresolved binding.
resolveMotion(BaseNode node, {required ScopedValues scopedValues, bool animate = true}) → MotionModel?
The motion node shows now: its BaseNode.motion with the values bound through motion.<name> variables resolved from scopedValues, the settings in MotionModel.settings (duration, delay, curve), and motion.replayKey and motion.pulseKey resolved to text. With animate (the running app), a motion.loop binding switches the loop (see MotionModel.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 node when it has no text.
shareDragValues(BuildContext context, String name, DragValues values) → void
Writes a drag's live values into the variable named name, so nodes outside the dragged one can follow it (see DragModel.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 variable name (see DragModel.xVariable). Does nothing for an empty name, a missing or computed variable, or an unchanged value.