final originalExif = await Exif.fromPath(widget.file.path);
dynamic originMetaDataAttributes = await originalExif.getAttributes();
originMetaDataAttributes['PixelXDimension'] = controller.croppedImage?.width;
originMetaDataAttributes['PixelYDimension'] = controller.croppedImage?.height;
final tempPath = '${directory.path}/${DateTime.now().millisecondsSinceEpoch.toString()}_edited.${widget.extension}';
await File(tempPath).writeAsBytes(imageBytes);
final exif = await Exif.fromPath(tempPath);
await exif.writeAttributes(originMetaDataAttributes);
flutter: PlatformException(SRC_ERROR, Error while getting source type, null, null)