패키지, 저장소 및 앱 카테고리 검색

liquid_swipe 표지
패키지 상세v3.1.0

liquid_swipe

제공된 위젯에 액체 스와이프 효과를 구현하기 위한 플러터 플러그인입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.9천
좋아요
1.4천
Pub 점수
150

패키지 설치

flutter pub add liquid_swipe

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Liquid Swipe는 위젯에 유체처럼 흐르는 스와이프 효과를 가능하게 하는 Flutter 패키지로, 부드러운 전환을 통해 사용자 상호작용을 향상시킵니다. 매력적인 온보딩 화면, 이미지 슬라이더 또는 동적 수평 스와이프가 필요한 모든 UI 제작에 적합합니다. 이 플러그인은 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 다양한 기기에서 일관된 동작을 보장합니다. `flutter pub add liquid_swipe`를 통해 최소한의 설정으로 개발자는 쉽게 효과를 앱에 통합할 수 있습니다. 소스 코드는 오픈소스이며 GitHub에 호스팅되어 있어 투명성과 커뮤니티 기여를 보장합니다.

사용 사례

  • 온보딩 화면
  • 이미지 슬라이더
  • 인터랙티브 튜토리얼
  • 스와이프 기반 탐색
  • 동적 콘텐츠 캐러셀

주요 기능

  • 부드러운 액체 전환 효과
  • 크로스 플랫폼 지원
  • Flutter와의 간편한 통합
  • 사용자 정의 가능한 스와이프 동작
  • 오픈소스이며 지속적으로 유지 관리되고 있습니다

적합한 대상

  • 애니메이션 UI를 찾는 개발자
  • 인터랙티브 온보딩이 있는 앱
  • 디자인 중심 모바일 애플리케이션
  • 다중 플랫폼 Flutter 프로젝트
  • UI/UX 개선 열정가

고려 사항

  • 저사양 기기에서 성능에 영향을 줄 수 있습니다
  • 대규모 데이터 세트를 신중하게 처리해야 합니다
  • 복잡한 제스처에 대한 사용자 정의가 제한됨
  • 정적 콘텐츠에 적합하지 않습니다
  • 경량 위젯과 함께 사용하는 것이 가장 좋습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.


Liquid Swipe

Pub Awesome Flutter

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

Table of contents

Getting Started

  • Add this to your pubspec.yaml

    dependencies:
    liquid_swipe: ^3.1.0
    
    
  • Get the package from Pub:

    flutter packages get
    
  • Import it in your file

    import 'package:liquid_swipe/liquid_swipe.dart';
    

Usage

  • Liquid Swipe just requires the list of Widgets like Container. Just to provide flexibity to the developer to design its own UI through it.
final pages = [
   Container(...),
   Container(...),
   Container(...),
 ];
  • Now just pass these pages to LiquidSwipe widget.
 @override
 Widget build(BuildContext context) {
   return new MaterialApp(
     home: Builder(
         builder: (context) =>
             LiquidSwipe(
                 pages: pages
             )),
   );
 }

Migration

Some things to keep in mind while updating to v2.0.0 from any version.

  • v2.0.0 is migrated to null safety. See migration
  • Attribute enableSlideIcon is removed from LiquidSwipe. You can simply pass null to slideIconWidget to enable and disable it.
  • Attribute positionSlideIcon is now ranged from 0.0 to 1.0.
  • Next Reveal is there by default. If you want to disable it you might want to make changes in your fork. Create an issue I will help.

That's it ;)

Sample APK

Please download apk from Releases or Assets folder

Documentation

LiquidSwipe

Please Refer to API documentation for more details.

Property Type Description Default Value
pages List<Widget> Set Pages/Views/Containers. See complete example for usage. @required value
fullTransitionValue double Handle swipe sensitivity through it. Lower the value faster the animation 400.0
initialPage int Set initial page value, wrong position will throw exception. 0
slideIconWidget Widget Icon/Widget you want to display for swipe indication. Remember the curve will be created according to it. null
positionSlideIcon double Icon position on vertical axis. Must satisfy this condition 0.0 <= value <= 1.0 0.8
enableLoop bool Whether you want to loop through all those pages. true
liquidController LiquidController Controller to handle some runtime changes. Refer null
waveType WaveType enum Type of clipper you want to use. WaveType.liquidReveal
onPageChangeCallback Callback Triggered whenever page changes. null
currentUpdateTypeCallback Callback Triggered whenever UpdateType changes. Refer null
slidePercentCallback Callback Triggered on Swipe animation. Use carefully as its quite frequent on swipe. null
ignoreUserGestureWhileAnimating bool If you want to block gestures while swipe is still animating. See #5 false
disableUserGesture bool Disable user gesture, always. false
enableSideReveal bool Enable/Disable side reveal false
preferDragFromRevealedArea bool Disabling the drag from the whole page and allowing only from the revealed part of the screen and the icon false

LiquidController

A Controller class with some utility fields and methods.

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, 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

  • Properties
    • currentPage - Getter to get current Page. Default value is 0.
    • isUserGestureDisabled - If somehow you want to check if gestures are disabled or not. Default value is false;
  • Methods
    • animateToPage({required int page, int duration = 600}) 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}) Jump Directly to mentioned Page index but without Animation.
    • shouldDisableGestures({required bool disable}) Use this method to disable gestures during runtime, like on certain pages using OnPageChangeCallback.

Please Refer to API documentation for more details.

Credits

Disclaimer : This project is not anyhow connected to Cuberto, but have apprised them through this issue.

Author & support

This project is created by Sahdeep Singh but with lots of support and help. See credits.

If you appreciate my work you can connect/endorse me on LinkedIn to keep me motivated.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Sahdeep Singh

💻

Yasser Omar Jammeli

💻 🐛

Mourad Brahim

💻

heshesh2010

🐛 📓

Federico Tarascio

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트