AnimateWidget class
Implicitly and explicitly animate its child.
You set the animation parameters such as duration
, reverseDuration
, curve
,
reverseCurve
; lowerBound
, upperBound
, initialValue
and animationBehavior
.
You can set the number of repeats or cycle that animation will perform before stops.
You can listen to animation end using endAnimationListener
You can also control when the animation will starts by setting one of
triggerOnInit
, triggerOnRebuild
, resetOnRebuild
.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimateWidget
Constructors
- AnimateWidget({Key? key, double? initialValue, double lowerBound = 0.0, double upperBound = 1.0, Duration duration = const Duration(milliseconds: 500), Duration? reverseDuration, Curve curve = Curves.linear, Curve? reverseCurve, int? repeats, int? cycles, void endAnimationListener()?, AnimationBehavior animationBehavior = AnimationBehavior.normal, bool triggerOnInit = true, bool triggerOnRebuild = false, bool resetOnRebuild = false, required Widget builder(BuildContext, Animate animate)})
-
const
Properties
- animationBehavior → AnimationBehavior
-
The behavior of the controller when AccessibilityFeatures.disableAnimations is true.
final
- builder → Widget Function(BuildContext, Animate animate)
-
final
- curve → Curve
-
Animation curve, It defaults to Curves.linear
final
- cycles → int?
-
The number of times the animation cycles, animation will repeat by
alternating between begin and end on each repeat.
final
- duration → Duration
-
Animation duration
final
- endAnimationListener → (void Function()?)
-
Callback to be fired after animation ends (After purge of repeats and cycle)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → double?
-
The AnimationController's value the animation start with.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lowerBound → double
-
The value at which this animation is deemed to be dismissed.
final
- repeats → int?
-
The number of times the animation repeats (always from start to end).
final
- resetOnRebuild → bool
-
When set to true, animation will reset and restart from its lowerBound
final
- reverseCurve → Curve?
-
Animation curve to be used when the animation is going in reverse.
final
- reverseDuration → Duration?
-
The length of time this animation should last when
going in reverse.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- triggerOnInit → bool
-
When it is set to true, animation will auto start after first initialized.
final
- triggerOnRebuild → bool
-
When it is set to true, animation will try to trigger on rebuild.
final
- upperBound → double
-
The value at which this animation is deemed to be completed.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _AnimateWidgetState -
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}) → 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