Slidable status (open/close)
Hi, How can we know which pane is currently open or close?
Same question I need to know this as it seems the author remove the Slidable.builder in the package.
Try with Slidable.of(context)!.closing check for more
Stateful class with SingleTickerProviderStateMixin
late final SlidableController _controller;
void initState() { _controller=SlidableController(this); super.initState();
} //Add controller to slidable
void FunctionIsOpen(){ if(controller.actionPaneType.value==ActionPaneType.none){ //slider is close } else { //Slider is open } }
Pass a controller with Slidable(controller: controller, ...) and read controller.actionPaneType.value (ActionPaneType.none means closed). It is a ValueNotifier, so you can also listen to it. controller.animation gives the exact ratio.