imageFileName static method

String imageFileName(
  1. String imageRefId
)

Generates the image file name from the image reference ID.

Implementation

static String imageFileName(String imageRefId) {
  _ParsedReference ref;
  try {
    ref = _ParsedReference.from(imageRefId);
  } catch (e) {
    throw InvalidReferenceException(imageRefId);
  }

  return '${ref.id}-${ref.width}x${ref.height}.${ref.format}';
}