ScrollAdapter class

Drives an Animate animation from a ScrollController.

begin and end adjust the pixel range for the scroll to update the animation within. Values <0 are calculated relative to the end of the scroll. They default to minScrollExtent and maxScrollExtent respectively.

For example, this starts fading/sliding in the text once the list scrolls to 100px, and finishes 200px before the end of the scroll:

ListView(
  controller: scrollController,
  children: items,
);
Text("Hello").animate(
  adapter: ScrollAdapter(
    scrollController,
    begin: 100, // relative to start of scroll
    end: -200,  // relative to end
  )
).fadeIn().slide();
Inheritance
Annotations

Constructors

ScrollAdapter(ScrollController scrollController, {double? begin, double? end, bool? animated})

Properties

animated → bool
Indicates whether the adapter should animate to new values. If false, it will jump to the new value, if true it will animate to the value using a duration calculated from the animation's total duration and the value change. Defaults to false.
finalinherited
begin → double?
final
end → double?
final
hashCode → int
The hash code for this object.
no setterinherited
notifier → ChangeNotifier
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
valueGetter → ValueGetter<double>
finalinherited

Methods

init(AnimationController controller) → void
inherited
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