AnimationDefinition class abstract

AnimationDefinition allows you to define a CSS-like animation and apply it in a build phase. Override this class to define new animations.

Implementers

Constructors

AnimationDefinition({AnimationPreferences preferences = const AnimationPreferences(), bool needsWidgetSize = false, bool needsScreenSize = false, double preRenderOpacity = 1.0})
Constructor with all parameters' defaults.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
needsScreenSize bool
When true, instructs AnimatorWidget to preRender the child without animation and extracts the screen-size in order to supply it to AnimationDefinition.build() in the next render.
final
needsWidgetSize bool
When true, instructs AnimatorWidget to preRender the child without animation and extracts the child's size in order to supply it to AnimationDefinition.build() in the next render.
final
preferences AnimationPreferences
Pass AnimationPreferences to setup offset, duration, autoPlay and add an AnimationStatusListener
final
preRenderOpacity double
Sets the visibility of the child during the preRender when needsWidgetSize or needsScreenSize is set to true. Use this property to prevent 'flickering' when rendering in-animations.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, Animator animator, Widget child) Widget
AnimatorWidget calls build to retrieve the animated Widget. The extracted Animator from the getDefinition phase is injected to supply a controller and the Animation objects. Example: @override Widget build(BuildContext context, Animator animator, Widget child) { return FadeTransition( opacity: animation.get('opacity'), child: child, ); }
getDefinition({Size? screenSize, Size? widgetSize}) Map<String, TweenList>
AnimatorWidget calls getDefinition to gather the animation. Animations are defined using named TweenLists using a Map<String, TweenList>. Example: @override Map<String, TweenList> getDefinition({Size screenSize, Size widgetSize}) { return { "opacity": TweenList
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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