popup static method

Future<bool> popup(
  1. String txt, {
  2. String imgFile = "",
})

Implementation

static Future<bool> popup(String txt, { String imgFile = "" } ) async {
  BuildContext? ctx = globalNavigatorKey.currentContext;
  if (ctx == null) return false;
  dialog = true;
  return showDialog(
      context: ctx,
      builder: (BuildContext context) {
        return Center(
            child: NotificationDialog(txt, imageFilename: imgFile));
      }).then((ok)  {
        dialog = false;
        return ok ?? false;
      });
}