getAsset method
Get an asset by ID.
Implementation
@override
Future<bundle.AssetContent> getAsset(String id) async {
final artifact = await _storagePort.getArtifact(id);
if (artifact == null) {
throw AssetNotFoundException(id);
}
final bytes = await _resolver(artifact);
return bundle.AssetContent(
assetId: artifact.artifactId,
mimeType: _mimeTypeFor(artifact),
content: bytes,
size: bytes.length,
);
}