FLUTTER ECOSYSTEM

salkuadrat/swipe

Flutter에서 위, 아래, 왼쪽 및 오른쪽 스와이프를 감지하는 간단한 방법입니다.

스와이프 프로젝트 이미지
Stars
9
Forks
8
최근 푸시(UTC)
2021. 11. 6.
프로젝트 상태
활성
Salman S GitHub avatar
GITHUB User

Salman S ↗

In an eternal pilgrimage...

Indonesia
언어DartHTMLSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Swipe

The easy way to detect swipe up, down, left and right in Flutter.

Getting Started

Add dependency to your flutter project:

$ flutter pub add swipe

or

dependencies:
  swipe: ^0.0.1

or

dependencies:
  swipe:
    git: 
      url: git://github.com/salkuadrat/swipe.git

Then run flutter pub get.

Usage

Here is a simple way of using Swipe.

Swipe(
  child: ..., // your child widget
  onSwipeUp: () {
    // do something when swiping up
  },
  onSwipeDown: () {
    // do something when swiping down
  },
  onSwipeLeft: () {
    // do something when swiping left
  },
  onSwipeRight: () {
    // do something when swiping right
  },
)

Customization

Swipe widget comes with additional parameters to customize your swiping experience.

Swipe(
  child: ...,
  onSwipeUp: ...,
  onSwipeDown: ...,
  onSwipeLeft: ...,
  onSwipeRight: ...,
  verticalMaxWidthThreshold: 50,
  verticalMinDisplacement: 100,
  verticalMinVelocity: 300,
  horizontalMaxHeightThreshold: 50,
  horizontalMinDisplacement: 100,
  horizontalMinVelocity: 300,
)

Example

You can try a working example here.