FloatingActionButtonAnimator class abstract
Provider of animations to move the FloatingActionButton between FloatingActionButtonLocations.
The Scaffold uses Scaffold.floatingActionButtonAnimator to define:
- The Offset of the FloatingActionButton between the old and new FloatingActionButtonLocations as part of the transition animation.
- An Animation to scale the FloatingActionButton during the transition.
- An Animation to rotate the FloatingActionButton during the transition.
- Where to start a new animation from if an animation is interrupted.
See also:
- FloatingActionButton, which is a circular button typically shown in the bottom right corner of the app.
- FloatingActionButtonLocation, which the Scaffold uses to place the Scaffold.floatingActionButton within the Scaffold's layout.
Constructors
- FloatingActionButtonAnimator()
-
Abstract const constructor. This constructor enables subclasses to provide
const constructors so that they can be used in const expressions.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAnimationRestart(
double previousValue) → double - Gets the progress value to restart a motion animation from when the animation is interrupted.
-
getOffset(
{required Offset begin, required Offset end, required double progress}) → Offset -
Gets the FloatingActionButton's position relative to the origin of the
Scaffold based on
progress
. -
getRotationAnimation(
{required Animation< double> parent}) → Animation<double> - Animates the rotation of Scaffold.floatingActionButton.
-
getScaleAnimation(
{required Animation< double> parent}) → Animation<double> - Animates the scale of the FloatingActionButton.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- noAnimation → const FloatingActionButtonAnimator
- Creates an instance of FloatingActionButtonAnimator where the FloatingActionButton does not animate on entrance and exit when FloatingActionButtonLocation is shown or hidden and when transitioning between FloatingActionButtonLocations.
- scaling → const FloatingActionButtonAnimator
- Moves the FloatingActionButton by scaling out and then in at a new FloatingActionButtonLocation.