AspectScope class final

Carries the active Aspect down to Adaptive and any element that branches on AspectScope.of — the multi-aspect counterpart to the render-mode and noise scopes.

render(video, aspect:) mounts one of these over the composition so the whole subtree lays out for that aspect, while timing and animations resolve identically across aspects (only layout branches). Unlike the frame clocks, of is non-throwing: with no scope it falls back to Aspect.fallback, so a live preview and a stray Adaptive still have a sane default and need no wrapper.

The scope widget is mounted by the render shell; authors read the active aspect at build time through the of accessor.

Inheritance
Available extensions

Constructors

AspectScope({required Aspect aspect, required Widget child, Key? key})
Provides aspect to every descendant of child.
const

Properties

aspect Aspect
The aspect every descendant reads through of / maybeOf.
final
child Widget
The widget below this widget in the tree.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

animate(List<Animation> animations, {Anchor? anchor, TimeRange? window, Defaults? defaults}) Widget

Available on Widget, provided by the Animate extension

Binds animations to this widget by wrapping it in a MotionTarget.
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.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show({Time? from, Time? to}) Widget

Available on Widget, provided by the Animate extension

Visibility-window sugar: animate([], window: from.to(to)) with from defaulting to the window start and to to its end.
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 AspectScope 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) Aspect?
The nearest aspect above context, or null when no scope is present.
of(BuildContext context) Aspect
The nearest aspect above context, or Aspect.fallback when there is no AspectScope (a plain preview branches as Aspect.reels).