Controller class

Allows a consumer to control the list position and track current page and any emitted events through a ScrollEventCallback. Track page and scroll events without further configuration. For control of the Scroller, use the attach method.

Constructors

Controller()

Properties

feedback StreamController<ControllerFeedback>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(ScrollEventCallback listener) → void
Allows a consumer to listen to events by registering a ScrollEventCallback to the controller. Remeber to use disposeListeners when disposing parent widgets
animateToPosition(int position) Future<void>
Command the list to move to the given position in an animated manner. To ignore animation, use jumpToPosition instead
attach() Stream<ControllerFeedback>?
Called to provide a stream of ControllerFeedback events into the TikTokStyleFullPageScroller such as jumpToPosition and animateToPosition along with their associated data..
disposeListeners() → void
Remove all listeners to ensure there are no memory leaks.
getScrollPosition() int
Returns the scroll position as tracked by the controller
jumpToPosition(int position) → void
Command the list to switch to the given position in a synchronous and immediate manner. There will be no animation. To animate, use animateToPosition instead.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners(ScrollEvent event) → void
Send ScrollEvent notifications to all registered listeners
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited