download method
return the file as downloadable/stream file
DownloadableFile file = Storage().download('images/avatar/sample.jpeg');
return file;
or
DownloadableFile file = Storage().download('images/avatar/sample.jpeg');
return response(file);
Implementation
Future<DownloadableFile> download(String filename) async {
StreamFile streamFile = await stream(filename);
String name = filename.split('/').last;
return DownloadableFile(streamFile.contentType, streamFile.stream, name);
}