downloadBytes method

Future<Uint8List> downloadBytes(
  1. String url
)

Implementation

Future<Uint8List> downloadBytes(String url) {
  return get(
    url,
    options: Options(
      responseType: ResponseType
          .bytes, // Ensures the response is treated as a byte stream
    ),
  ).then(
    (response) => response.data,
  );
}