Tuesday, September 26, 2023

Flutter based liquid swipe

This repository contains the Liquid Swipe source code. Liquid swipe is the revealing clipper to bring off amazing liquid like swipe to stacked Container and inspired by Cuberto’s liquid swipe and IntroViews.

Sample APK

Download sample apk as shown in example from releases.

Getting Started

  • Add this to your pubspec.yamldependencies: liquid_swipe: ^1.4.3
  • Get the package from Pub:flutter packages get
  • Import it in your fileimport 'package:liquid_swipe/liquid_swipe.dart';


  • Liquid Swipe just requires the list of containers. Just to provide flexibity to the developer to design its own view through it.
final pages = [
  • Now just pass these pages to LiquidSwipe widget.
 Widget build(BuildContext context) {
   return new MaterialApp(
     home: Builder(
         builder: (context) =>
                 pages: pages


AttributeDatatypeDescriptionDefault ValueComments
pagesList<Container>Set the Pages/ views/ ContainersNullA Page can contain anything, look for an example
fullTransitionValuedoubleSets the scroll distance or sensitivity for a complete swipe.400.0This transition value can be used to increase or decrease the sensitivity of the swipe. 100.0 would make swipe really fast with even a bit of drag
initialPageintSet the initial Page0Should not be >= no.of pages or smaller than 0
enableSlideIconboolUsed to enable Slide icon to the right for where the wave would originatefalseGives a ios style arrow to right side of the screen. Might include modification to it soon.
slideIconWidgetWidgetCreate your own icon and add hereIcon(Icons.arrow_back_ios)You can use icons from Icons package. Thanks to PR #10
positionSlideIcondoublePosition your icon in y-axis at right side of the screen0.54Range from -1 to 1, -1 represents extreme top and 1 represent extreme bottom. Soon add x-axis position, if required!
enableLoopboolEnable or disable pages recurrence.trueIf you dont want to make pages to be in the loop, use this attribute.
waveTypeWaveTypeSelect the type of reveal you want.WaveType.liquidRevealYou can use circularReveal, more coming soon. Import Helpers.dart file if Autoimport doesn’t work.
onPageChangeCallbackCallBackPass your method as a callback, it will return a pageNo.Nonesee Example
currentUpdateTypeCallbackCallBacksame Callback but returns an UpdateTypeNonesee Example