show method

dynamic show(
  1. GlobalKey<NavigatorState> key, {
  2. String? text,
})

Implementation

show(GlobalKey<NavigatorState> key, {String? text}) {
  if (!_showing) {
    _showing = true;
    key.currentState!
        .push(CustomPopupRoutes(
            pageBuilder: (_, __, ___) {
              return Center(
                child: (text != null)
                    ? onlyText(text)
                    : const CircularProgressIndicator(),
              );
            },
            barrierDismissible: false))
        .then((_) {});
  }
}