Flutter-dio出错 [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type 'DioError' is n

郎华皓
2023-12-01

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type 'DioError' is not a subtype of type 'String'

 

下载文件出现上述错误:

Response response = await dio.download(
    "https://123.sogou.com/", "/storage/emulated/0/xx.html");
if (response.statusCode == 200) {
  print('下载请求成功');
}

是url路径写错了。

 类似资料: