downloadFile function

Future<Stream<StreamedResponse>> downloadFile(
  1. String url
)

Implementation

Future<Stream<StreamedResponse>> downloadFile(String url) async {
  var httpClient = Client();
  var request = Request('GET', Uri.parse(url));
  var response = httpClient.send(request);

  return response.asStream();
}