DialogConfirm constructor
const
DialogConfirm({})
Constructs a DialogConfirm widget with the specified properties.
Required parameters:
title: The dialog's title text.onConfirm: The callback for the confirm action.
Optional parameters with defaults:
destructive: false, for standard confirmations.description: null, falls back todescriptionWidget.descriptionWidget: SizedBox.shrink(), an empty widget.confirmText: "Confirm", the confirm button label.cancelText: "Cancel", the cancel button label.actions: null, no additional actions.
The constructor initializes all fields directly and supports const construction for performance in Flutter builds. Use named parameters for clarity when instantiating.
Implementation
const DialogConfirm({
super.key,
required this.title,
this.destructive = false,
this.description,
this.descriptionWidget = const SizedBox.shrink(),
this.confirmText = "Confirm",
this.cancelText = "Cancel",
this.actions,
required this.onConfirm,
});