showDeletedDialog method

void showDeletedDialog({
  1. String title = "Deleted",
  2. String middleText = "This item is deleted!",
  3. String textCancel = "Ok",
  4. Color backgroundColor = Colors.white,
  5. TextStyle? middleTextStyle,
  6. TextStyle? textStyle,
})

Shows a deletion confirmation dialog.

Displays a GetX default dialog informing the user that an item has been deleted. Includes a single "Ok" button to dismiss the dialog.

Parameters:

  • title: Dialog title (defaults to "Deleted").
  • middleText: Dialog message (defaults to "This item is deleted!").
  • textCancel: Button text (defaults to "Ok").
  • backgroundColor: Background color of the dialog (defaults to white).
  • middleTextStyle: Style for the message text. Defaults to black text.
  • textStyle: Style for the title text. Defaults to black text.

Uses GetX's Get.defaultDialog for display.

Example:

showDeletedDialog(
  title: 'Item Removed',
  middleText: 'The item has been successfully deleted.',
  textCancel: 'Close',
);

Implementation

void showDeletedDialog(
    {String title = "Deleted",
    String middleText = "This item is deleted!",
    String textCancel = "Ok",
    Color backgroundColor = Colors.white,
    TextStyle? middleTextStyle,
    TextStyle? textStyle}) {
  Get.defaultDialog(
    title: title,
    middleText: middleText,
    textCancel: textCancel,
    backgroundColor: backgroundColor,
    titleStyle: textStyle ?? const TextStyle(color: Colors.black),
    middleTextStyle: middleTextStyle ?? const TextStyle(color: Colors.black),
  );
}