animatePanelToSnapPoint method

Future<void> animatePanelToSnapPoint({
  1. Duration? duration,
  2. Curve curve = Curves.linear,
})

Animates the panel position to the snap point Requires that the SlidingUpPanel snapPoint property is not null (optional) duration specifies the time for the animation to complete (optional) curve specifies the easing behavior of the animation.

Implementation

Future<void> animatePanelToSnapPoint(
    {Duration? duration, Curve curve = Curves.linear}) {
  assert(isAttached, "PanelController must be attached to a SlidingUpPanel");
  assert(_panelState!.widget.snapPoint != null,
      "SlidingUpPanel snapPoint property must not be null");
  return _panelState!
      ._animatePanelToSnapPoint(duration: duration, curve: curve);
}