BodyDefaultAlert constructor

const BodyDefaultAlert({
  1. Key? key,
  2. required String title,
  3. required String description,
  4. Color? confirmButtonColor,
  5. Color? cancelButtonColor,
  6. TextStyle? titleStyle,
  7. TextStyle? descriptionStyle,
  8. TextStyle? confirmButtonTextStyle,
  9. TextStyle? cancelButtonTextStyle,
  10. TextAlign? textAlignDescription,
  11. Widget? body,
  12. String? cancelText,
  13. Function? cancelAction,
  14. required double paddingScreen,
  15. required double heightButtons,
  16. required double buttonCornerRadius,
  17. required double cornerRadius,
  18. required double paddingBody,
  19. required String confirmText,
  20. required Function confirmAction,
  21. bool? isHtml,
  22. 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
});