confirm method

Future<UserInput> confirm (String htmlInfoText, List<String> buttonLabels)

Shows a modal ConfirmDialog. See ConfirmDialog for a description of the arguments. While ConfirmDialog needs a close callback, this async method returns the user input (which consists of the pressed button since other user input can't be entered in a ConfirmDialog.

Implementation

static Future<UserInput> confirm(
  String htmlInfoText,
  List<String> buttonLabels,
) async {
  return ConfirmDialog.show(htmlInfoText, buttonLabels);
}