flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

how to dismiss slidableAction when using other widget

Open rt234cw opened this issue 1 year ago • 1 comments

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'),),
              ],
            ),

rt234cw avatar Jan 28 '24 06:01 rt234cw

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'),), ],

samih93 avatar Mar 30 '24 09:03 samih93