LiquidSwipe constructor Null safety
- {Key? key,
- required List<
Widget> pages, - double fullTransitionValue = FULL_TRANSITION_PX,
- int initialPage = 0,
- Widget? slideIconWidget,
- double positionSlideIcon = 0.8,
- bool enableLoop = true,
- LiquidController? liquidController,
- WaveType waveType = WaveType.liquidReveal,
- OnPageChangeCallback? onPageChangeCallback,
- CurrentUpdateTypeCallback? currentUpdateTypeCallback,
- SlidePercentCallback? slidePercentCallback,
- bool ignoreUserGestureWhileAnimating = false,
- bool disableUserGesture = false,
- bool enableSideReveal = false}
Constructor for LiquidSwipe for predefined pages
Required List of Widgets like Container/SizedBox
sample page :
Container(
color: Colors.pink,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Image.asset(
'assets/1.png',
fit: BoxFit.cover,
),
Padding(
padding: EdgeInsets.all(20.0),
),
Column(
children: <Widget>[
Text(
"Hi",
style: MyApp.style,
),
Text(
"It's Me",
style: MyApp.style,
),
Text(
"Sahdeep",
style: MyApp.style,
),
],
),
],
),
),
You can just create a list using this type of widgets
Implementation
LiquidSwipe({
Key? key,
required List<Widget> pages,
this.fullTransitionValue = FULL_TRANSITION_PX,
this.initialPage = 0,
this.slideIconWidget,
this.positionSlideIcon = 0.8,
this.enableLoop = true,
this.liquidController,
this.waveType = WaveType.liquidReveal,
this.onPageChangeCallback,
this.currentUpdateTypeCallback,
this.slidePercentCallback,
this.ignoreUserGestureWhileAnimating = false,
this.disableUserGesture = false,
this.enableSideReveal = false,
}) : assert(initialPage >= 0 && initialPage < pages.length),
assert(positionSlideIcon >= 0 && positionSlideIcon <= 1),
liquidSwipeChildDelegate = LiquidSwipePagesChildDelegate(pages),
super(key: key);