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

photo_card_swiper 표지
패키지 상세v0.0.6

photo_card_swiper

사진 목록용 스와이프 카드 레이아웃을 만들기 위한 간단한 플러터 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
18
좋아요
43
Pub 점수
130

패키지 설치

flutter pub add photo_card_swiper

패키지 개요

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

Tinder 스타일의 상호작용을 영감으로 삼아 사진 목록을 표시하기 위한 스와이프 가능한 카드 인터페이스를 생성하도록 설계된 가벼운 Flutter 패키지입니다. 부드러운 수평 스와이프와 직관적인 제스처를 지원하여 사진 갤러리나 이미지 기반 콘텐츠 탐색에 이상적입니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하며, 크로스플랫폼 일관성을 보장합니다. 단순성에 중점을 두어 최소한의 구성으로 기존 Flutter 프로젝트에 쉽게 통합할 수 있습니다.

사용 사례

  • 사진 갤러리
  • 이미지 브라우징 앱
  • 티ン더 유사 인터페이스
  • 콘텐츠 탐색 기능
  • 소셜 미디어 피드
  • 시각적 스토리텔링 앱

주요 기능

  • 왼쪽/오른쪽 스와이프 제스처
  • 부드러운 애니메이션 전환
  • 크로스 플랫폼 지원
  • 간단한 API 통합
  • 사용자 지정 가능한 카드 외관
  • 내장된 제스처 인식

적합한 대상

  • 이미지가 많은 앱을 개발하는 개발자
  • 스와이프 가능한 카드 UI가 필요한 프로젝트
  • 시각 콘텐츠를 갖춘 모바일 및 웹 애플리케이션
  • 인터랙티브 레이아웃 프로토타이핑
  • 사용자 중심 콘텐츠 선택을 갖춘 앱

고려 사항

  • 기본 스타일링을 넘어서는 사용자 정의가 제한적
  • 내장된 이미지 로딩 없음(외부 패키지 필요)
  • 큰 이미지 목록에 대한 성능 최적화가 필요할 수 있습니다
  • 복잡한 드래그 앤 드롭 상호작용에 적합하지 않습니다
  • 이미지 처리를 위해 외부 종속성에 의존합니다

원본 README

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

photo_card_swiper

Language: English

A simple flutter package for creating a swiping card layout for list of photos.

photo_card_swiper is a photo slider resembling card stack. Card comprises options to reflect like, dislike and favorite feature. The card elements are highly customisable. This layout is quite common in social media apps like Instagram, tinder etc.

Technical Notes:

The layout for pages is built using stack of draggable widgets using LayoutBuilder. This package supports cards to be tapped too. Dev have options show 2 or 3 buttons, change the color, icon name and icon color of those buttons too.

How to use it.

the usage is very simple, just use the following code for default rendering of photos. Default values for Icons and Colors are taken care for easy usage.

PhotoCardSwiper(
     photos: widget._photos,
     showLoading: false,
 ),

or use the following with customizations

 PhotoCardSwiper(
     photos: widget._photos,
     showLoading: true,
     hideCenterButton: false,
     leftButtonIcon: Icons.close,
     rightButtonIcon: Icons.check,
     centerButtonIcon: Icons.favorite,
     leftButtonBackgroundColor: Colors.red[100],
     rightButtonBackgroundColor: Colors.lightGreen[100],
     centerButtonBackgroundColor: Colors.lightBlue[50],
     leftButtonIconColor: Colors.red[600],
     rightButtonIconColor: Colors.lightGreen[700],
     centerButtonIconColor: Colors.lightBlue[600],
     leftButtonAction: _leftButtonClicked,
     rightButtonAction: _rightButtonClicked,
     centerButtonAction: _centerButtonClicked,
     onCardTap: _onCardTap,
     cardSwiped: _cardSwiped,
 ),

Parameters for photo_card_swiper

parameter description value
photos Array of Photo data to be rendered as cards, Use PhotoCard object to group card details. [PhotoCard]()
showLoading Toggle the value to show/hide loading card This is a optional parameter. value cane be true/false
hideCenterButton Use this to have only 2 action buttons. This is a optional parameter. Pass either true/false
leftButtonIcon Left button Icon This is a optional parameter. Pass IconData type value
rightButtonIcon Right button Icon This is a optional parameter. Pass IconData type value
centerButtonIcon Center button Icon This is a optional parameter. Pass IconData type value
leftButtonBackgroundColor Left button Background Color This is a optional parameter. Pass Color type value
rightButtonBackgroundColor Right button Background Color This is a optional parameter. Pass Color type value
centerButtonBackgroundColor Center button Background Color This is a optional parameter. Pass Color type value
leftButtonIconColor Left button Icon Color This is a optional parameter. Pass Color type value
rightButtonIconColor Right button Icon Color This is a optional parameter. Pass Color type value
centerButtonIconColor Center button Icon Color This is a optional parameter. Pass Color type value
leftButtonAction Left button click handler This is a optional parameter. Pass method to be called on click.
rightButtonAction Right button click handler This is a optional parameter. Pass method to be called on click.
centerButtonAction Center button click handler This is a optional parameter. Pass method to be called on click.
onCardTap Background color of Tabbar This is a optional parameter. Example pass method with completion handler. (int _index) { }
cardSwiped Background color of Tabbar This is a optional parameter. Example pass method with completion handler. (CardActionDirection _direction, int _index) { }

Attributes/Properties of PhotoCard

parameter description default
title String to be displayed in title Text widget empty string
description String to be displayed in description Text widget empty string
imagePath Image path of image, either local assets folder image or http image path empty string
isLocalImage Value is true if imagePath is local assets folder image, Value is true if imagePath is http image path true

Please note try to load max of 10 photos at one time. This helps stack to be neat. To show more photos load them on pagination basis using cardSwiped method.

The usage is well described in the example code.

git repo here

Made with ❤ and dedicated with respect to the Saviour Sonu Sood

카테고리

소스 저장소

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

아직 데이터가 없습니다.