xCMD_XMedia_OpenPhoto method

Future xCMD_XMedia_OpenPhoto(
  1. XMediaItem xMedia,
  2. XFDataItem item, {
  3. DateTime? dtImage,
  4. bool isNewNota = false,
})

Comando per aprire una foto degli XMedia

Implementation

Future xCMD_XMedia_OpenPhoto(XMediaItem xMedia, XFDataItem item, {DateTime? dtImage, bool isNewNota = false}) async {
  xMedia.isSel = true;
  var res = await showDialog<bool?>(
      context: context,
      builder: (context) {
        return ImagePainter.signature(
          xMedia: xMedia,
          isNewNota: isNewNota,
          height: MediaQuery.of(context).size.height / 1.2,
          width: MediaQuery.of(context).size.width,
          loadMedia: (xclMedia) async => await xLoadMedia(xclMedia),
          key: _imagePainterState_Key,
        );
      });
  xMedia.isSel = false;
  if (res != null && res) {
    setState(() => xMedia.isModified = true);
    xOnAfterActionOnDett_INTERNAL(itemInEdit_Clone);
  } else {}
}