AnimatedGradient class
An AnimatedWidget that expects to be provided an initialized Listenable.
Breaks the mold for AnimatedWidgets naming schemes (except for the
AnimatedWidget
itself) as most AnimatedFoo
class objects actually extend
ImplicitlyAnimatedWidget and handle their own AnimationController.
But since this AnimatedGradient
is not intended to ever be built,
there is no means for managing the lifecycle of said controller.
- If this
Widget
is treed out and built, however, the return is a DecoratedBox whose gradient is set to observe.
Use a new AnimatedGradient
and its observe property for Gradient-type
return, provided some Animation<double> controller
, to drive a
customizable animation on the gradientInput by tweaking this object's
storyboard map of GradientAnimations.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimatedWidget
- AnimatedGradient
Constructors
-
AnimatedGradient({Key? key, required Animation<
double> controller, required Gradient gradient, Map<GradientAnimation, dynamic> storyboard = const {}, GradientCopyWith overrideCopyWith = spectrumCopyWith}) -
Use this object's observe property, after providing some
controller
, to drive a customizable animation on the gradientInput by tweaking the storyboard map of GradientAnimations.const
Properties
-
animation
→ Animation<
double> -
The provided
Animation<double>
from construction, accessed assuper.listenable
.no setter - gradientInput → Gradient
-
The
Gradient
provided at construction.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listenable → Listenable
-
The Listenable to which this widget is listening.
finalinherited
- observe → Gradient
-
Observe the output
Gradient
which applies modifications to the gradientInput based on the animation and other provided properties, considering storyboard and the relevant mappings from
GradientAnimations ->dynamic
, wheredynamic
matches with the key:no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storyboard
→ Map<
GradientAnimation, dynamic> -
Mappings from
GradientAnimation
s ->dynamic
, wheredynamic
matches with the key:final
Methods
-
build(
BuildContext context) → Widget -
An AnimatedGradient is not intended to be built directly like a
true
Widget
. Instead opt to observe for the direct Gradient- type output.override -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AnimatedWidget> -
Subclasses typically do not override this method.
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
-
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}) → 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