📜  dio 下载错误 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:45.857000             🧑  作者: Mango

代码示例1
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);
}