Animator class

The Animator class is the heart of this library. It registers and converts TweenLists, creates and manages controllers, etc.

To create an animation, please see AnimatorWidget and AnimationDefinition classes for a description.

Constructors

Animator({required TickerProvider vsync})
constructor, requires a TickerProvider

Properties

controller AnimationController?
Getter for the AnimationController
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
vsync TickerProvider
The tickerProvider for an Animator instance
final

Methods

build(BuildContext context, Widget child) Widget
Builds the AnimationDefinition.
dispose() → void
Disposes the controller.
forward({double from = 0.0}) → void
Plays the animation forward from passed parameter.
get(String key) Animation?
Returns an Animation registered by the user in AnimationDefinition.getDefinition() function.
loop({bool pingPong = false}) → void
Loop an animation. Pass pingPong to loop forward and reversed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Rewinds and stops the animation.
resolveDefinition({Size? widgetSize, Size? screenSize}) → void
Resolves the AnimationDefinition, creates a controller and sets offset and duration from the passed in AnimationPreferences. If needsWidgetSize and/or needsScreenSize are true inside the definition these will be passed to the AnimationDefinition
reverse({double from = 1.0}) → void
Plays the animation backwards from passed parameter.
setAnimationDefinition(AnimationDefinition definition) → void
Sets the AnimationDefinition to be used for creating a controller.
stop() → void
Pauses the animation.
toString() String
A string representation of this object.
inherited

Operators

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