📅  最后修改于: 2022-03-11 14:58:45.857000             🧑  作者: Mango
Options options= new Options(
responseType: ResponseType.STREAM
);
Dio dio = new Dio(options);
try {
Response response = await dio.download(
url, outputDirectory + filename, flush: true);
dio.interceptor.response.onError = (DioError e) {
print("error=" + e.message);
};
} on DioError catch (e) {
print("error "+e.message);
}