Item de lista deslizável flexível e personalizável para aplicativos Flutter. Adicione múltiplos botões de ação, controle animações e feche automaticamente itens abertos com facilidade.
Orientação gerada a partir de informações públicas. Apenas para referência.
Slideable é um pacote flexível e personalizável do Flutter que permite itens de lista deslizantes com vários botões de ação. Permite aos desenvolvedores definir ações personalizadas, controlar o comportamento de animação e fechar automaticamente os itens abertos quando novos são ativados. Ideal para criar listas interativas com ações contextuais, como excluir, arquivar ou editar. O pacote suporta todas as principais plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux, garantindo comportamento consistente entre dispositivos.
Casos de uso
Itens de lista de tarefas interativos
Deslize para excluir mensagens
Painéis de ação personalizáveis
Gerenciamento de itens da lista
Interfaces de edição contextual
Principais recursos
Múltiplos botões de ação por item
Animações personalizáveis
Fechamento automático de itens abertos
Suporte multiplataforma
Integração fácil com ListView
Limites de deslize configuráveis
Indicado para
Desenvolvedores construindo listas interativas
Aplicativos que exigem gestos de deslize
Aplicações com foco em UI
Aplicativos móveis e web com listas dinâmicas
Equipes priorizando UX consistente
Considerações
Pode exigir ajustes de desempenho para listas grandes
A personalização da animação exige manipulação cuidadosa
Documentação limitada além do uso básico
Conflitos potenciais com outros detectores de gestos
Não otimizado para layouts extremamente complexos
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
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.