enrichPhotoWithPath static method

Future<PhotoWithThumbnail> enrichPhotoWithPath(
  1. String memberMediumdocumentID,
  2. String path
)

Implementation

static Future<PhotoWithThumbnail> enrichPhotoWithPath(
    String memberMediumdocumentID, String path) async {
  var baseName = BaseNameHelper.baseName(memberMediumdocumentID, path);
  var thumbnailBaseName =
      BaseNameHelper.thumbnailBaseName(memberMediumdocumentID, path);

  var imageBytes = await File(path).readAsBytes();
/*
  if (imageBytes == null) {
    throw Exception("Can't read $path. imageBytes is null");
  }
*/

  return enrichPhoto(baseName, thumbnailBaseName, imageBytes);
}