BodyDefaultAlert constructor
const
BodyDefaultAlert({
- Key? key,
- required String title,
- required String description,
- Color? confirmButtonColor,
- Color? cancelButtonColor,
- TextStyle? titleStyle,
- TextStyle? descriptionStyle,
- TextStyle? confirmButtonTextStyle,
- TextStyle? cancelButtonTextStyle,
- TextAlign? textAlignDescription,
- Widget? body,
- String? cancelText,
- Function? cancelAction,
- required double paddingScreen,
- required double heightButtons,
- required double buttonCornerRadius,
- required double cornerRadius,
- required double paddingBody,
- required String confirmText,
- required Function confirmAction,
- bool? isHtml,
- Function? close,
Implementation
const BodyDefaultAlert({
super.key,
required this.title, // Title of the alert.
required this.description, // Description text of the alert.
this.confirmButtonColor, // Optional color for the confirm button.
this.cancelButtonColor, // Optional color for the cancel button.
this.titleStyle, // Optional style for the title text.
this.descriptionStyle, // Optional style for the description text.
this.confirmButtonTextStyle, // Optional style for the confirm button text.
this.cancelButtonTextStyle, // Optional style for the cancel button text.
this.textAlignDescription, // Optional text alignment for the description.
this.body, // Optional additional body widget.
this.cancelText, // Optional text for the cancel button.
this.cancelAction, // Optional function to call when the cancel button is pressed.
required this.paddingScreen, // Padding around the alert dialog.
required this.heightButtons, // Height of the buttons.
required this.buttonCornerRadius, // Radius for rounding the corners of the buttons.
required this.cornerRadius, // Radius for rounding the corners of the alert dialog.
required this.paddingBody, // Padding inside the alert body.
required this.confirmText, // Text for the confirm button.
required this.confirmAction, // Function to call when the confirm button is pressed.
this.isHtml, // Optional flag to indicate if the description should be rendered as HTML.
this.close, //optional close function
});