CarouselControllerX class
Controller to operate the CarouselSlider. It interacts with the widget through callbacks.
One controller drives one carousel: handing the same instance to two carousels leaves the later-built one in charge. Give each carousel its own.
Constructors
- CarouselControllerX()
- Creates a new CarouselControllerX.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
animateToPage(
int page, {Duration duration = const Duration(milliseconds: 300), Curve curve = Curves.linear}) → Future< void> - Animates the controlled CarouselSlider from the current page to the given page.
-
dispose(
) → void - Disposes the controller.
-
jumpToPage(
int page) → void - Changes which page is displayed in the controlled CarouselSlider.
-
nextPage(
{Duration duration = const Duration(milliseconds: 300), Curve curve = Curves.linear}) → Future< void> - Animates the controlled CarouselSlider to the next page.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
previousPage(
{Duration duration = const Duration(milliseconds: 300), Curve curve = Curves.linear}) → Future< void> - Animates the controlled CarouselSlider to the previous page.
-
setupCallbacks(
{required PageChangeCallback onNextPage, required PageChangeCallback onPreviousPage, required JumpToCallback onJumpToPage, required AnimateToPageCallback onAnimateToPage}) → void - Sets up the callbacks for the controller. This method is called by the CarouselSlider widget. Please do not call this method from outside the package.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited