ConfirmationDialog constructor
const
ConfirmationDialog({})
Creates a ConfirmationDialog widget.
Parameters:
title: The title text displayed at the top (required).content: The content text displayed in the body (optional).child: Custom widget to display in the dialog body (optional).onConfirm: Callback executed when confirm button is pressed (required).onCancel: Optional callback executed when cancel button is pressed.okText: Text label for the confirm button (optional, uses default if not provided).okColor: Color for the confirm button text and icon (optional).cancelText: Text label for the cancel button (optional, uses default if not provided).cancelColor: Color for the cancel button text and icon (optional).icon: Icon displayed at the top of the dialog (optional, uses default if not provided).
Implementation
const ConfirmationDialog({
super.key,
required this.title,
this.content,
this.child,
required this.onConfirm,
this.onCancel,
this.okText,
this.okColor,
this.cancelText,
this.cancelColor,
this.icon,
});