Adapters provide a mechanism to drive an animation from an arbitrary source.
For example, synchronizing an animation with a scroll, controlling
an animation with a slider input, or progressing an animation based on
the time of day.
The Flutter Animate library makes adding beautiful animated effects to your widgets
simple. It supports both a declarative and chained API. The latter is exposed
via the Widget.animate extension, which simply wraps the widget in Animate.
Applies animated effects to a list of widgets. It does this by wrapping each
widget in Animate, and then proxying calls to all instances. It can
also offset the timing of each widget's animation via interval.
Effect that animates a blur on the target (via ImageFiltered)
between the specified begin and end blur radius values. Defaults to a blur radius of begin=0, end=4.
An effect to apply an animated rectangular drop shadow (via DecoratedBox).
The begin and end parameters accept BoxShadow instances to animate between.
You can also specify a borderRadius that defines rounded corners for the shadow.
Effect that calls a callback function at a particular point in the animation.
It includes a boolean value indicating if the animation is playing in reverse.
For example:
Class that defines the required interface and helper methods for
all effect classes. Look at the various effects for examples of how
to build new reusable effects. One-off effects can be implemented with
CustomEffect.
Because Effect classes are immutable and may be reused between multiple
Animate (or AnimateList) instances, an EffectEntry is created to store
values that may be different between instances. For example, due to
AnimateList interval, or from inheriting values from prior effects in the chain.
An effect that applies an animated elevation shadow (via PhysicalModel)
You can also specify a color and borderRadius to add rounded corners.
See PhysicalModel for more information.
Effect that rotates the target (via RotationTransition) between the specified begin and end.
Values are specified in "turns", so a begin=0.25, end=2.25 would start with the child
rotated 90 degrees clockwise (ie. 0.25 * 360), and rotate two full turns (ie. 720 degrees).
An effect that animates the color saturation of the target. The begin and
end values indicate the saturation level, where 0 is fully desaturated
(ie. grayscale) and 1 is normal saturation. Values over 1 will oversaturate.
Effect that shakes the target, using translation, rotation, or both.
The hz parameter indicates approximately how many times to repeat the shake
per second.
Effect that moves the target based on a fraction of its size (via SlideTransition)
based on the specified begin and end offsets. Defaults to begin=Offset(0, -0.5), end=Offset.zero (ie. slide down from half its height).
Effect that swaps out the incoming child for a new child at a particular
point in time. This includes all preceding effects. It uses a builder so
that the effect can be reused, but note that the builder is only called once
when the effect initially builds.
A special convenience "effect" that makes it easier to sequence effects after
one another. It does this by calculating a new inheritable delay by adding the
previous effect's delay, duration and its own optional delay.
An effect that applies an animated color tint to the target. The begin and
end values indicate the strength of the tint (0 - 0% tint, 1 - 100% tint).
The default color is opaque black (Color(0xFF000000)).
If color has an opacity less than one, that opacity is multiplied against
the strength. Ex. Colors.black54 at strength 0.5 would apply a 27%
black tint.
Builds a sub-animation to the provided controller that runs from start to
end, with the provided curve. For example, it could create an animation that
runs from 300ms to 800ms with an easeOut curve, within a controller that has a
total duration of 1000ms.
The builder type used by Animate.reparentTypes. It must accept an existing
parent widget, and rebuild it with the provided child. In effect, it clones
the provided parent widget with the new child.