Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行的时候报错。 #4

Closed
leisure520 opened this issue May 9, 2018 · 1 comment
Closed

运行的时候报错。 #4

leisure520 opened this issue May 9, 2018 · 1 comment

Comments

@leisure520
Copy link

leisure520 commented May 9, 2018

` var dio = new Dio();
//dio.options.baseUrl = "http://www.dtworkroom.com/doris/1/2.0.0/";
dio.options.baseUrl = "http://localhost/ds/test";
// dio.onHttpClientCreate = (HttpClient client) {
// client.idleTimeout=new Duration(seconds: 0);
// client.findProxy = (uri) {
// //proxy all request to localhost:8888
// return "PROXY localhost:8888";
// };
// };
FormData formData = new FormData.from({
"name": "haha",
"file": new UploadFileInfo(new File("./example/flutter.png"), "flutter.png")
});
// Send FormData
Response response =
await dio.post("http://127.0.0.1:8123/upload", data: formData);
print(response);

`

type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, dynamic>'
具体原因可能最新版flutter自带的dart修改了一些MAP方法了。

@leisure520
Copy link
Author

当然上面的程序可能写法有问题,直接只用
FormData formData = new FormData.from({
"name": "haha",
"file": new UploadFileInfo(new File("./example/flutter.png"), "flutter.png")
});
这段同样报错。

@wendux wendux closed this as completed in 4366854 May 14, 2018
@fly512 fly512 mentioned this issue Jan 7, 2019
AlexV525 added a commit that referenced this issue Feb 13, 2023
Co-authored-by: xiaoranran <xiaoranran1993@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant