Ambient class
Motion that carries no information, declared by the app so a scenario can photograph it standing still.
A spinner says "busy" whatever phase it is at. So does a shimmering
skeleton, a pulsing dot, a looping Lottie. None of them ever stops asking
for frames, so every scenario step with one on screen runs out its settle
budget, records settled: false, and costs the scenario its whole budget
on every replay — measured on a real suite, one spinner in a list row made
its scenario ten times slower than its siblings. Changing the app for the
test runner, or shortening the budget and still reporting the step
unsettled, both answer the wrong question.
import 'package:flutterware/ambient.dart';
Ambient(child: CircularProgressIndicator())
Outside a scenario it builds child and nothing else. Inside one, child
builds under TickerMode(enabled: false), so nothing in it schedules a
frame, and every Material progress indicator in it without a controller of
its own is drawn at one fixed phase — the same picture on every run and
every machine, however many frames a step happened to pump.
The indicators take their phase from a stopped AnimationController
supplied through ProgressIndicatorTheme, the framework's own seam for
who drives an indeterminate indicator. It takes both halves: the theme
controller alone still leaves the indicator's internal controller
repeating, and the ticker mode alone freezes the indicator at the start of
its cycle, which draws a dot where the spinner was. Anything else under
here freezes at its own start.
Settle.strict is not relaxed by it. A suite that calls a spinner in a
picture a bug still fails a step that ends with an Ambient on screen,
frozen or not: freezing makes the picture deterministic, not the loader
acceptable.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Ambient
Properties
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Ambient> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited