xOnDelXMedia_INTERNAL method

Future<bool?>? xOnDelXMedia_INTERNAL(
  1. XMediaItem xMedia,
  2. XFDataItem item
)

Implementation

Future<bool?>? xOnDelXMedia_INTERNAL(XMediaItem xMedia, XFDataItem item) async {
  var res = await showDialog<bool?>(
      context: context,
      builder: (context) {
        return XAlertDialog(
          title_Text: "Sicuro di voler cancellare ${xMedia.mediaType == XEnums.mediaType.image.value ? "la foto" : xMedia.mediaType == XEnums.mediaType.audio.value ? "l'audio" : "il video"}  ?",
          title_Style: XStyles.xStyTextForSubLabel(textColor: XColors.warning),
          btnNO_label: "Annulla",
          btnYES_label: "Si",
          btnNO_OnPressed: () => Navigator.pop(context, false),
          btnYES_OnPressed: () => Navigator.pop(context, true),
        );
      });
  if (res != null && res) {
    res = await xOnDelXMedia(xMedia)!;
    return res;
  } else
    return false;
}