AnimationOnScrollController class
A controller playing animations triggered by scrolling.
If the ScrollController has registered an Offset change, the animation will be played forward or in reverse. The required AnimationController will be declared as a property and is initialized by calling the AnimationOnScrollController constructor. The listener will then be attached on the animation controller.
Constructors
- AnimationOnScrollController({required ScrollController? scrollController, AnimationDirection direction = AnimationDirection.forward, double requiredScrollOffset = 32.0, required TickerProvider vsync, Duration animationDuration = const Duration(milliseconds: 130)})
- Creates an AnimationOnScrollController.
Properties
- animationController ↔ AnimationController
-
The animation controller required to play the animation.
getter/setter pair
- animationDuration → Duration
-
The duration the animation should last.
final
- direction → AnimationDirection
-
The direction in which the animation should be played.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- requiredScrollOffset → double
-
The required offset to trigger the animation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
The ScrollController of the widgets on which the animation on scroll
should be played.
final
- vsync → TickerProvider
-
The Ticker required for the AnimationController.
final
Methods
-
dispose(
) → void - Disposes the AnimationController.
-
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