flutter_slidable
flutter_slidable copied to clipboard
how to dismiss slidableAction when using other widget
For example, I am using TextButton. How do I dismiss the sliablaction after pressing the button?
Slidable(
endActionPane: ActionPane(
motion: const ScrollMotion(),
children: [
TextButton(onPressed: () {}, child: const Text('cancel'),),
],
),
fianl slidableController = SlidableController(this); Slidable( controller: slidableController, // Specify a key if the Slidable is dismissible. key: const ValueKey(0), motion: const ScrollMotion(), children: [ TextButton(onPressed: () { slidableController .close(); }, child: const Text('cancel'),), ],