shortId property

String get shortId

Returns the first 12 characters of the image ID (the "short" form).

The sha256: prefix is stripped before truncating. Returns an empty string before build is called.

Implementation

String get shortId {
  final id = _imageId ?? '';
  final stripped = id.startsWith('sha256:') ? id.substring(7) : id;
  return stripped.length > 12 ? stripped.substring(0, 12) : stripped;
}