LiquidSwipe class

LiquidSwipe widget for out of the box Animation between stacked Widgets.

For Simple Usage LiquidSwipe just requires List of Widgets and assign it to LiquidSwipe.pages

Pages can be or should be Containers or SizedBox etc. Please report if doesn't work on some specific type of the Widgets

Example :

    LiquidSwipe(
      pages: pages,
    ),

All Other parameters are optional and can be neglected, otherwise see documentation related to each of them.

An Example of LiquidSwipe with Default values (excluding callbacks) :

LiquidSwipe()

      LiquidSwipe(
          pages: pages,
          fullTransitionValue: FULL_TRANSITION_PX,
          initialPage: 0,
          enableSlideIcon: false,
          slideIconWidget: const Icon(Icons.arrow_back_ios),
          positionSlideIcon: 0.54,
          enableLoop: true,
          waveType: WaveType.liquidReveal,
          liquidController: liquidController,
          disableUserGesture: false,
          ignoreUserGestureWhileAnimating: false,
       ),

LiquidSwipe.builder(itemBuilder: itemBuilder, itemCount: itemCount)

      LiquidSwipe.builder(
          itemCount : data.length,
          itemBuilder : (context, index) => Container(...),
          fullTransitionValue: FULL_TRANSITION_PX,
          initialPage: 0,
          enableSlideIcon: false,
          slideIconWidget: const Icon(Icons.arrow_back_ios),
          positionSlideIcon: 0.54,
          enableLoop: true,
          waveType: WaveType.liquidReveal,
          liquidController: liquidController,
          disableUserGesture: false,
          ignoreUserGestureWhileAnimating: false,
       ),
Inheritance

Constructors

LiquidSwipe({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 preferDragFromRevealedArea = false, bool ignoreUserGestureWhileAnimating = false, bool disableUserGesture = false, bool enableSideReveal = false})
Constructor for LiquidSwipe for predefined pages Required List of Widgets like Container/SizedBox
LiquidSwipe.builder({Key? key, required IndexedWidgetBuilder itemBuilder, required int itemCount, 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 preferDragFromRevealedArea = false, bool ignoreUserGestureWhileAnimating = false, bool disableUserGesture = false, bool enableSideReveal = false})
A builder constructor with same fields but with itemBuilder Sample itembuilder :

Properties

currentUpdateTypeCallback CurrentUpdateTypeCallback?
see CurrentUpdateTypeCallback
final
disableUserGesture bool
Required a bool value for disabling the user touch. you can still perform programmatic swipes
final
enableLoop bool
Required a bool value in order to make the swipe in loop mode or not, i.e., to repeat them or not after reaching last page.
final
enableSideReveal bool
Required a bool to Enable or Disable the side reveal i.e., this clip area on the right side with 15.0px of reveal.
final
fullTransitionValue double
Required a double value for swipe animation sensitivity
final
hashCode int
The hash code for this object.
no setterinherited
ignoreUserGestureWhileAnimating bool
Required a bool value for disabling Fast Animation between pages
final
initialPage int
If you want to change the initial page
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
liquidController LiquidController?
Required a LiquidController object for some magic methods
final
liquidSwipeChildDelegate LiquidSwipeChildDelegate
A Custom child delegate responsible for child creation in case of builder or fetcher in case of List.
final
onPageChangeCallback OnPageChangeCallback?
see OnPageChangeCallback
final
positionSlideIcon double
Required a double value ranges from 0.0 - 1.0
final
preferDragFromRevealedArea bool
Required a bool value to prefer disabling the drag from the whole page and allowing only from the revealed part of the screen and the icon.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slideIconWidget Widget?
Required a Widget that will be visible only if enableSlideIcon is set to true
final
slidePercentCallback SlidePercentCallback?
see SlidePercentCallback
final
waveType WaveType
Type of Wave you want, its a enum, you might have to import helpers.dart
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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