dismiss method

void dismiss({
  1. bool animation = true,
})

Implementation

void dismiss({bool animation = true}) async {
  if (animation) {
    CsLoadingContainerState? loadingContainerState = key?.currentState;
    if (loadingContainerState != null) {
      final Completer<void> completer = Completer<void>();
      loadingContainerState.dismiss(completer);
      completer.future.then((value) {
        _remove();
      });
      return;
    }
  }
  _remove();
}