dismiss method

Future<Null> dismiss()

Used to dismiss the panel. No matter how much PanelSize.closedHeight is given, by calling this, the panel gets completely hidden as if you gave it a PanelSize.closedHeight to 0.0.

(Animation is played).

This is not intended to be a general purpose function to hide the panel. Instead, use of close is suggested. This can be used for, like if you are using PanelAutoSizing.headerSizeIsClosed and you want to hide the panel including the header also.

Returned future is completed when the panel is dismissed.

Implementation

Future<Null> dismiss() async {
  if (controlling)
    await _setPanelPosition(panel!,
        duration: _getDuration(from: currentPosition, to: 0.0),
        to: 0.0,
        shouldClamp: false);
  else
    return Future.error('Missing Controller');
}