openConfirmDialog function

void openConfirmDialog({
  1. required String title,
  2. String? description,
  3. String confirmLabel = 'Confirm',
  4. String cancelLabel = 'Cancel',
  5. bool destructive = false,
  6. required VoidCallback onConfirm,
  7. VoidCallback? onCancel,
})

Helper for standard confirmation dialogs.

Implementation

void openConfirmDialog({
  required String title,
  String? description,
  String confirmLabel = 'Confirm',
  String cancelLabel = 'Cancel',
  bool destructive = false,
  required VoidCallback onConfirm,
  VoidCallback? onCancel,
}) {
  openDialog(
    title: title,
    description: description,
    confirmLabel: confirmLabel,
    cancelLabel: cancelLabel,
    destructive: destructive,
    onConfirm: onConfirm,
    onCancel: onCancel,
  );
}