confirmAction method

void confirmAction(
  1. Future<(dynamic, dynamic, String?)> call(),
  2. void reload(), {
  3. String? title,
  4. String? message,
})

Asks for confirmation (the dialog closes itself), then runs call through send. Defaults to a delete prompt.

Implementation

void confirmAction(Future<(dynamic, dynamic, String?)> Function() call, void Function() reload, {String? title, String? message}) => UNavigator.confirm(
  title: title ?? U.s.delete,
  message: message ?? U.s.areYouSureYouWantToDelete,
  destructive: title == null,
  onConfirm: () => send(call(), reload),
);