parseImage static method
Splits an image reference into the name to pull and its tag: latest
when none is given, none for a digest (name@sha256:...).
Implementation
static (String, String?) parseImage(String image) {
if (image.contains('@')) {
return (image, null);
}
final colon = image.lastIndexOf(':');
if (colon > image.lastIndexOf('/')) {
return (image.substring(0, colon), image.substring(colon + 1));
}
return (image, 'latest');
}