show method

Future<UserInput> show (String htmlInfoText)
override

Shows a modal InfoDialog with centered htmlInfoText. While InfoDialog needs a close callback, this async method returns the user input (button code DiaAttr.DIA_ACT_ABORT when the red cross is pressed).

Implementation

static Future<UserInput> show(String htmlInfoText) async {
  Completer<UserInput> cpl = Completer();
  void closeCallback(UserInput results) {
    cpl.complete(results);
  }

  InfoDialog(htmlInfoText, closeCallback);
  return cpl.future;
}