loadBytes method

  1. @override
Future<ByteData> loadBytes(
  1. BuildContext? context
)
override

Load the byte data for a vector graphic binary asset.

Implementation

@override
Future<ByteData> loadBytes(BuildContext? context) async {
  final http.Client client = _httpClient ?? http.Client();
  final Uint8List bytes = (await client.get(url, headers: headers)).bodyBytes;
  return bytes.buffer.asByteData();
}