CueScope class

An InheritedWidget that exposes a CueController to the subtree.

CueScope is the bridge between a Cue widget and the Actor widgets nested inside it. Every Cue wraps its child in a CueScope, and every Actor reads from it to drive its animations.

You rarely need to interact with CueScope directly. Use CueScope.of or CueScope.maybeOf when building custom acts or widgets that need access to the current animation controller.

Inheritance
Available extensions

Constructors

CueScope({Key? key, required Widget child, required CueController controller, required bool reanimateFromCurrent, required TrackConfig defaultConfig})
Creates a CueScope with the given child, controller, and reanimateFromCurrent.
const

Properties

child → Widget
The widget below this widget in the tree.
finalinherited
controller → CueController
The controller that manages the animation state.
final
defaultConfig → TrackConfig
The default track configuration for this scope, inherited from the parent Cue.
final
hashCode → int
The hash code for this object.
no setterinherited
isAnimating → bool
Whether the animation is currently running.
no setter
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
reanimateFromCurrent → bool
Whether to reanimate from the current position when the animation triggers again.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

act(List<Act> acts, {CueMotion? motion, CueMotion? reverseMotion, Duration delay = Duration.zero, Duration reverseDelay = Duration.zero}) → Widget

Available on Widget, provided by the ActorExtenstion extension

Wraps this widget with an Actor using the provided acts.
createElement() → InheritedElement
Inflates this configuration to a concrete instance.
inherited
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.
override
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
updateShouldNotify(covariant CueScope oldWidget) → bool
Whether the framework should notify widgets that inherit from this widget.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

maybeOf(BuildContext context) → CueScope?
Retrieves the CueScope from the given context, or null if not found.
of(BuildContext context) → CueScope
Retrieves the CueScope from the given context.