Home > OS >  How to close Action Pane By clicking button in action pane Flutter Slidable
How to close Action Pane By clicking button in action pane Flutter Slidable

Time:07-30

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

CodePudding user response:

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

final SlidableController? controller = Slidable.of(context);
controller?.close();

CodePudding user response:

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

  • Related