getValue static method

Future getValue(
  1. ValueDialog valueDialog
)

Implementation

static Future<dynamic> getValue(ValueDialog valueDialog) async {
  BuildContext? ctx = globalNavigatorKey.currentContext;
  if (ctx == null) return "";
  dialog = true;
  return showDialog(
      context: ctx,
      builder: (BuildContext context) {
        return Center(child: valueDialog);
      }).then((value) {
    dialog = false;
    return value ?? "";
  });
}