0

How to close Action Pane By clicking "No" button in action pane. I'm Using Flutter Slidable Package

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56

3 Answers3

0

First try to get the SlidableController from the context and you can close with that:

final SlidableController? controller = Slidable.of(context);
controller?.close();
Dániel Rózsa
  • 429
  • 4
  • 5
0

There is an basically code which you can use

    SlideAction({
    Key? key,
    required this.child,
    VoidCallback? onTap,
    Color? color,
    Decoration? decoration,
    bool closeOnTap = _kCloseOnTap,
  })

This can be use to perform operation on both button on No Button just set closeOnTap to true

Ankit Tale
  • 1,924
  • 4
  • 17
  • 30
0

You need to use the SlidableAction Widget this fixed it for me

Benny
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 05 '23 at 04:38