openDialog function

void openDialog({
  1. required String title,
  2. String? description,
  3. BloomNode? body,
  4. String? confirmLabel,
  5. String? cancelLabel,
  6. bool destructive = false,
  7. VoidCallback? onConfirm,
  8. VoidCallback? onCancel,
})

Opens a general modal dialog.

Implementation

void openDialog({
  required String title,
  String? description,
  BloomNode? body,
  String? confirmLabel,
  String? cancelLabel,
  bool destructive = false,
  VoidCallback? onConfirm,
  VoidCallback? onCancel,
}) {
  activeDialog.value = DialogConfig(
    title: title,
    description: description,
    body: body,
    confirmLabel: confirmLabel,
    cancelLabel: cancelLabel,
    destructive: destructive,
    onConfirm: onConfirm,
    onCancel: onCancel,
  );
}