Slideable은 여러 작업 버튼을 가진 스와이프 가능한 리스트 항목을 가능하게 하는 유연하고 사용자 정의 가능한 Flutter 패키지입니다. 개발자는 사용자 정의 작업을 정의하고 애니메이션 동작을 제어하며 새 항목이 활성화될 때 열려 있는 항목을 자동으로 닫을 수 있습니다. 삭제, 아카이브 또는 편집 옵션과 같은 맥락 기반 작업을 갖춘 상호작용형 목록을 만들기에 적합합니다. 이 패키지는 Android, iOS, Web, macOS, Windows 및 Linux를 포함한 모든 주요 플랫폼을 지원하여 장치 간 일관된 동작을 보장합니다.
사용 사례
인터랙티브 할 일 목록 항목
스와이프하여 메시지 삭제
사용자 정의 가능한 액션 패널
리스트 항목 관리
컨텍스트 기반 편집 인터페이스
주요 기능
항목당 여러 개의 액션 버튼
사용자 지정 가능한 애니메이션
열린 항목의 자동 닫기
크로스 플랫폼 지원
ListView와의 간편한 통합
사용자 정의 슬라이드 기준
적합한 대상
인터랙티브 리스트를 구축하는 개발자
스와이프 제스처가 필요한 앱
UI 중심 애플리케이션
동적 목록을 갖춘 모바일 및 웹 앱
일관된 사용자 경험을 우선시하는 팀
고려 사항
큰 목록의 경우 성능 조정이 필요할 수 있습니다
애니메이션 사용자 정의는 신중하게 다뤄야 합니다
기본 사용법 외에 문서가 제한적
다른 제스처 감지기와의 잠재적 충돌
매우 복잡한 레이아웃에 최적화되지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Slideable
This is a flexible slideable implementation that will allow you to pass simple widgets(icons or anything at all) as action items, and also control various backgrounds for the action item, and closes an already slide item in your list.
This is a side project that I have reused severally on lots of my project and decided to turn it into a package for anyone that wants more flexibility than the usual flutter_slidable package.
Features
Control flexibility on the type of widget to use as your action item.
A predefined callback function that automatically closes an already slid item in your list.
Can contain a maximum of 6 action items.
You can control the animation curver and animation speed.
Getting started
In the pubspec.yaml of you flutter project, add the following dependency:
dependencies:
slideable: <latest_version>
In your screen or page, add the below import, to expose the package:
import'package:slideable/Slideable.dart';
Basic Usage
ActionItems, controls the actions widget you would want to have in the display. This is a List<ActionItems>, where, each actionItem consists of the requiredicon widget, which can be any accepted Flutter Widget, a requiredonPress function, that executes what you want that ActionItem to do, a defaulted backgroundColor of transparent, which is totally flexible to change and a radius, just incase you want to add a tweak to your design to match the Slidable child's borderRadius.
Slideable, requires the ActionItems item widget list and the child, which will be the initial point of contact in our case.
The other values includes the backgroundColor, which by default is set to transparent' but can be changed to suit your design. resetSlide, which is a boolean value used to notifiy the Slideable to close all the slid item, unless set to false by an external false. A duration, which is used to control the the slide time and the curve, which is used to control the speed or motion of the slide animation.