Animator<T> class
A facade widget that hide the complexity of setting animation in Flutter
It allows you to easily implement almost all the available Animation in flutter
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Animator
- Available Extensions
- AnimatedContainerWidgetExtension
- BadgeExtension
- CardExtension
- CenterExtension
- ContainerWidgetExtension
- GestureExtensions
- ObjectExtensions
- OpacityExtension
- PaddingExtensions
- RandomContainerWidgetExtension
- RoutesWidgetsExtension
- ScrollExtension
- ShapesExtension
- ShiftWidgetExt
- ShimmerExtension
- SizedBoxExtension
- SkeletonExtension
- ThemeExtension
- TransformExtension
- WidgetsExtension
Constructors
-
Animator({Key? key, Tween<
T> ? tween, Map<String, Tween> ? tweenMap, Duration duration = const Duration(milliseconds: 500), Curve? curve = Curves.linear, int? cycles, int? repeats, bool resetAnimationOnRebuild = false, bool? triggerOnInit, required Widget builder(BuildContext context, AnimatorState<T> animatorState, Widget? child), Widget? child, AnimatorKey<T> ? animatorKey, void customListener(AnimatorState<T> )?, void endAnimationListener(AnimatorState<T> )?, void statusListener(AnimationStatus, AnimatorState<T> )?}) - A facade widget that hide the complexity of setting animation in Flutter
Properties
-
animatorKey
→ AnimatorKey<
T> ? -
The name of your Animator widget.
Many widgets can have the same name.
final
-
builder
→ Widget Function(BuildContext context, AnimatorState<
T> animatorState, Widget? child) -
The build strategy currently used for one Tween. Animator widget rebuilds
itself every time the animation changes value.
final
- child → Widget?
-
Widget that you do not want to animate.
It is the static part of the animated Widget.
final
- curve → Curve?
-
An easing curve, i.e. a mapping of the unit interval to the unit interval.
final
-
customListener
→ (void Function(AnimatorState<
T> )?) -
Function to be called every time the animation value changes.
final
- cycles → int?
-
The number of forward and backward periods the animation
performs before stopping
final
- duration → Duration
-
A span of time, such as 27 days, 4 hours, 12 minutes, and 3 seconds
final
-
endAnimationListener
→ (void Function(AnimatorState<
T> )?) -
VoidCallback to be called when animation is finished.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- repeats → int?
-
The number of forward periods the animation performs before stopping
final
- resetAnimationOnRebuild → bool
-
Whether the animation settings are reset when Animator widget
is rebuilt. The default value is false.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
statusListener
→ (void Function(AnimationStatus, AnimatorState<
T> )?) -
Function to be called every time the status of the animation changes.
final
- triggerOnInit → bool?
-
Whether to start the animation when the Animator widget
is inserted into the tree.
final
-
tween
→ Tween<
T> ? -
A linear interpolation between a beginning and ending value.
final
-
tweenMap
→ Map<
String, Tween> ? -
A linear interpolation between a beginning and ending value.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _AnimatorState< T> -
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