show method

Future<UserInput> show (Element parent, String id, List<String> htmlItemTexts, List<String> buttontypes, List<String> isChecked, int x, int y, bool preventDefault)

Shows an InputDialog. See InputDialog for a description of the arguments. While InputDialog needs a close callback, this async method returns the user input.

Implementation

static Future<UserInput> show(
    Element parent,
    String id,
    List<String> htmlItemTexts,
    List<String> buttontypes,
    List<String> isChecked,
    int x,
    int y,
    bool preventDefault) async {
  Completer<UserInput> cpl = Completer();
  void popupCallback(UserInput results) {
    cpl.complete(results);
  }

  PopupMenu(parent, id, htmlItemTexts, buttontypes, isChecked, popupCallback, x,
      y, preventDefault);

  return cpl.future;
}