TurnPageController class

TurnPageController is responsible for managing the page state and controlling the page-turning animation for TurnPageView.

Inheritance

Constructors

TurnPageController({int initialPage = 0, TurnDirection direction = TurnDirection.rightToLeft, double thresholdValue = _defaultThresholdValue, Duration duration = defaultTransitionDuration})

Properties

currentIndex int
no setter
direction TurnDirection
The direction in which the pages are turned.
final
duration Duration
The duration during which the page is turned.
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initialPage int
final
onSwipe ↔ void Function(bool isTurnForward)?
getter/setter pair
onTap ↔ void Function(bool isTurnForward)?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thresholdValue double
The threshold value is used to determine whether a page turn should be completed or reverted based on the percentage of the swipe gesture.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
animateToPage(int index) Future<void>
Animate to a specific page in the view.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
jumpToPage(int index) → void
Moves to a specific page in the view.
nextPage() → void
Moves to the next page in the view.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
previousPage() → void
Moves to the previous page in the view.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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