close method

void close({
  1. int? delay = 0,
})

Closes the dialog with optional delay.

delay - Milliseconds to wait before closing. Defaults to 0.

Implementation

void close({int? delay = 0}) {
  if (delay == 0 || delay == null) {
    _closeDialog();
    return;
  }
  Future.delayed(Duration(milliseconds: delay), () {
    _closeDialog();
  });
}