fetch method

  1. @override
Future<Uint8List> fetch({
  1. CdnFormat? format,
  2. int? size,
})
override

Fetch this asset and return its binary data.

Implementation

@override
Future<Uint8List> fetch({CdnFormat? format, int? size}) async {
  if (format != null || size != null) {
    throw UnsupportedError('Cannot specify attachment format or size');
  }

  final response = await client.httpHandler.httpClient.get(url);
  return response.bodyBytes;
}