detach method

void detach()

Implementation

void detach() {
  dismiss();
  if (_attachedStates.isNotEmpty) {
    _attachedStates.removeLast();
  }
}