dismiss method

Future<void> dismiss({
  1. Curve curve = Curves.easeInOut,
  2. Duration duration = const Duration(milliseconds: 300),
  3. VoidCallback? onDismissed,
})

close the SlidablePanel it will make all SlideActionPanel invisible it will have no effect if the SlidablePanel is already dismissed/closed onDismissed would be called when the SlidablePanel is actually dismissed by this operations

Implementation

Future<void> dismiss({
  Curve curve = Curves.easeInOut,
  Duration duration = const Duration(milliseconds: 300),
  VoidCallback? onDismissed,
}) async {
  if (!dismissed) {
    await _animationController.animateTo(
      _middleBound,
      curve: curve,
      duration: duration,
    );
    _resetDrag();
    _postActionController?.reset();
    _preActionController?.reset();
    onDismissed?.call();
  }
}