LiquidController class

Added in v1.5.0

A controller class similar to PageController but with Limited Capabilities for now. Provides method for dynamic changes to the LiquidSwipe

Simple Usage :

Firstly make an Object of LiquidController and initialize it in initState()

   LiquidController liquidController;

   @override
   void initState() {
   super.initState();
   liquidController = LiquidController();
   }

Now simply add it to LiquidSwipe's Constructor

   LiquidSwipe(
        pages: pages,
        LiquidController: liquidController,
    ),

Only Rules/Limitation to its Usage is For now you can't use any method in Liquid Controller before build method is being called in which LiquidSwipe is initialized

So we have to use them after LiquidSwipe is Built

Constructors

LiquidController()

Properties

currentPage int
Getter to get current Page see also : OnPageChangeCallback
no setter
hashCode int
The hash code for this object.
no setterinherited
isUserGestureDisabled bool
If somehow you want to check if gestures are disabled or not Returns bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

animateToPage({required int page, int duration = 600}) → dynamic
Animate to mentioned page within given Duration Remember the duration here is the total duration in which it will animate though all pages not the single page
jumpToPage({required int page}) → dynamic
Jump Directly to mentioned Page index but without Animation see also : LiquidProvider.jumpToPage
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setContext(BuildContext context) → dynamic
Internal Method Should not be used.
shouldDisableGestures({required bool disable}) → dynamic
Use this method to disable gestures during runtime, like on certain pages using OnPageChangeCallback If you want to disable gestures from start use LiquidSwipe.disableUserGesture
toString() String
A string representation of this object.
inherited

Operators

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