downloadBytes method

Future<Uint8List> downloadBytes(
  1. String url
)

Downloads the content from the specified URL as a Uint8List.

Parameters:

  • url: The URL from which to download the content.

Returns:

Implementation

Future<Uint8List> downloadBytes(String url) {
  final options = Options(
    responseType: ResponseType.bytes,
  );
  return dio.get(url, options: options).then((response) => response.data);
}