resolve method
Resolve the data
Implementation
Future<Uint8List> resolve({
required String name,
required Uri uri,
bool cache = true,
Map<String, String>? headers,
}) async {
if (cache && await contains(name)) {
return (await get(name))!;
}
final bytes = await _download(uri, headers: headers);
if (bytes == null) {
throw FlutterError('Unable to download $uri');
}
if (cache) {
await add(name, bytes);
}
return bytes;
}