LiquidProvider constructor
LiquidProvider({
- required int initialPage,
- required bool loop,
- required int length,
- required TickerProviderStateMixin<
StatefulWidget> vsync, - required double slideIcon,
- required OnPageChangeCallback? onPageChangeCallback,
- required CurrentUpdateTypeCallback? currentUpdateTypeCallback,
- required SlidePercentCallback? slidePercentCallback,
- required bool disableGesture,
- required bool enableSideReveal,
Constructor
Contains Default value or Developer desired Values
initialPage
- Initial Page of the LiquidSwipe (0 - n)
loop
- Should Enable Loop between Pages
length
- Total Number of Pages
Implementation
LiquidProvider({
required int initialPage,
required bool loop,
required int length,
required TickerProviderStateMixin vsync,
required double slideIcon,
required OnPageChangeCallback? onPageChangeCallback,
required CurrentUpdateTypeCallback? currentUpdateTypeCallback,
required SlidePercentCallback? slidePercentCallback,
required bool disableGesture,
required bool enableSideReveal,
}) {
slidePercentHor = 0.00;
slidePercentVer = 0.00;
activePageIndex = initialPage;
nextPageIndex = initialPage;
enableLoop = loop;
pagesLength = length;
singleTickerProviderStateMixin = vsync;
positionSlideIcon = slideIcon;
_currentUpdateTypeCallback = currentUpdateTypeCallback;
_slidePercentCallback = slidePercentCallback;
_onPageChangeCallback = onPageChangeCallback;
shouldDisableUserGesture = disableGesture;
this.enableSideReveal = enableSideReveal;
updateSlide(SlideUpdate(
SlideDirection.rightToLeft,
0.00,
positionSlideIcon,
UpdateType.dragging,
));
}