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

swipeable_card_stack 표지
패키지 상세v0.0.5

swipeable_card_stack

이것은 틴더와 유사한 스와이프 가능한 카드 패키지입니다. 스택에 사용자 정의 위젯을 추가하고 왼쪽, 오른쪽, 위, 아래의 모든 이벤트를 수신할 수 있습니다. 각 방향에 대해 사용자 고유의 비즈니스 로직을 정의할 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
216
좋아요
106
Pub 점수
115

패키지 설치

flutter pub add swipeable_card_stack

패키지 개요

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

Tinder와 유사한 스와이프 가능한 카드 스택을 가능하게 하는 플러터 패키지로, 개발자가 자신의 위젯으로 카드를 사용자 정의할 수 있습니다. 왼쪽, 오른쪽, 위, 아래 네 가지 방향의 스와이프를 지원하며, 각 방향에 대한 이벤트 콜백을 제공하여 방향별 맞춤형 비즈니스 로직을 구현할 수 있습니다. 데이팅 앱이나 콘텐츠 탐색 인터페이스와 같은 상호작용 기반 카드 기반 탐색이 필요한 앱에 적합합니다. 크로스플랫폼으로 Android, iOS, Web, macOS, Windows, Linux에서 모두 작동합니다.

사용 사례

  • 데이트 앱 인터페이스
  • 콘텐츠 탐색 기능
  • 인터랙티브 제품 쇼케이스
  • 사용자 선호도 수집
  • 게임화된 사용자 상호작용
  • 스와이프 기반 탐색

주요 기능

  • 사용자 정의 가능한 카드 위젯
  • 사방 스와이프 이벤트
  • 스와이프당 확장 가능한 비즈니스 로직
  • 크로스 플랫폼 지원
  • 부드러운 애니메이션 전환
  • pub.dev를 통한 간편한 통합

적합한 대상

  • 티ン더 스타일 앱을 개발하는 개발자
  • 상호작용 카드 UI가 필요한 디자이너
  • 제스처 기반 사용자 흐름이 필요한 프로젝트
  • 스와이프 상호작용이 있는 모바일 및 웹 애플리케이션
  • 인터랙티브 카드 경험 프로토타이핑

고려 사항

  • 스와이프 로직의 상태 관리가 필요합니다
  • 복잡한 카드 디자인을 위해 추가 스타일링이 필요할 수 있습니다
  • 대규모 카드 스택의 성능 영향
  • 스와이프 방향 외에 내장된 사용자 정의 기능은 제한적
  • 고급 효과를 위해 외부 애니메이션 라이브러리에 의존합니다

원본 README

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

swipeable_card_stack

This is Tinder like swipeable cards package. You can add your own widgets to the stack, receive all four events, left, right, up and down. You can define your own business logic for each direction.

Demo

Documentation

Installation

Add swipeable_card_stack to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # added below
  swipeable_card_stack: <latest version>
Adding to app

Use the SwipeableCardsSection widget provided by the package

@override
  Widget build(BuildContext context) {
    //create a SwipeableCardSectionController
    SwipeableCardSectionController _cardController = SwipeableCardSectionController();

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          SwipeableCardsSection(
            cardController: _cardController,
            context: context,
            //add the first 3 cards (widgets)
            items: [
              CardView(text: "First card"),
              CardView(text: "Second card"),
              CardView(text: "Third card"),
            ],
            //Get card swipe event callbacks
            onCardSwiped: (dir, index, widget) {
              //Add the next card using _cardController
              _cardController.addItem(CardView(text: "Next card"));
              
              //Take action on the swiped widget based on the direction of swipe
              //Return false to not animate cards
            },
            //
            enableSwipeUp: true,
            enableSwipeDown: false,
          ),
          //other children
        )
    }
          
Author

CodeToArt Technology

카테고리

소스 저장소

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