Flexible und anpassbare schiebbare Listenartikel für Flutter-Anwendungen. Fügen Sie mehrere Aktionsschaltflächen hinzu, steuern Sie Animationen und schließen Sie geöffnete Elemente einfach automatisch.
Aus öffentlichen Paketdaten erstellte Orientierung.
Slideable ist ein flexibles und anpassbares Flutter-Paket, das das Swipen von Listenartikeln mit mehreren Aktionsschaltflächen ermöglicht. Es erlaubt Entwicklern, benutzerdefinierte Aktionen zu definieren, das Animationsverhalten zu steuern und geöffnete Elemente automatisch zu schließen, wenn neue aktiviert werden. Ideal für interaktive Listen mit kontextbezogenen Aktionen wie Löschen, Archivieren oder Bearbeiten. Das Paket unterstützt alle wichtigen Plattformen, einschließlich Android, iOS, Web, macOS, Windows und Linux, und gewährleistet konsistentes Verhalten über Geräte hinweg.
Anwendungsfälle
Interaktive To-Do-Aufgaben-Elemente
Nachrichten per Wischen löschen
Anpassbare Aktionen-Panels
Listenpositionen verwalten
kontextuelle Bearbeitungsoberflächen
Hauptmerkmale
Mehrere Aktionsschaltflächen pro Element
Anpassbare Animationen
Automatisches Schließen geöffneter Elemente
Plattformübergreifende Unterstützung
Einfache Integration mit ListView
Konfigurierbare Schiebegrade
Geeignet für
Entwickler, die interaktive Listen erstellen
Apps, die Swip-Gesten erfordern
UI-intensive Anwendungen
Mobile und Web-Anwendungen mit dynamischen Listen
Teams, die konsistente Benutzererfahrung priorisieren
Hinweise
Kann Leistungsoptimierung für große Listen erfordern
Beschränkte Dokumentation außerhalb der grundlegenden Verwendung
Mögliche Konflikte mit anderen Gesten-Erkennern
Nicht für extrem komplexe Layouts optimiert
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
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.