LoopScrollMode enum
Enum representing different scroll directions for a LoopPageController.
Values:
shortest
: The LoopPageController will animate to the closest page. For example, if the current page is 1 and the target page is 5, but the total number of pages is 6, the LoopPageController will go backwards (from 1 to 6 to 5) instead of forwards (from 1 to 2 to 3 to 4 to 5). This is because the shortest path from 1 to 5 in this case is to go backwards.forwards
: The LoopPageController will always animate forwards to reach the target page. Even if the target page is technically closer when moving backwards, this option will make the controller move forwards until it reaches the target page.backwards
: The LoopPageController will always animate backwards to reach the target page. Similar toforwards
, but in the opposite direction. Even if the target page is technically closer when moving forwards, this option will make the controller move backwards until it reaches the target page.
Constructors
- LoopScrollMode()
-
const
Values
- shortest → const LoopScrollMode
- forwards → const LoopScrollMode
- backwards → const LoopScrollMode
Properties
Methods
-
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
Constants
-
values
→ const List<
LoopScrollMode> - A constant List of the values in this enum, in order of their declaration.