Response response = await Dio().post(
'https://.........................',
data: formData, //create a Stream>
options: Options(
headers: {
'App-Key': '...........',
'Nonce': randNum,
'Timestamp': intDateTime,
'Signature': sha1.convert(bytes),
},
),
);
在用了dio()发送请求获取token后,leancloud的邮箱登录
LCUser user = await LCUser.loginByEmail(emailController.text, passwordController.text);
就用不了了。会报以下错误:
E/flutter (17363): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: Class 'DioError' has no instance getter 'code'.
E/flutter (17363): Receiver: Instance of 'DioError'
E/flutter (17363): Tried calling: code.
打印异常信息e.message显示I/flutter (17363): type '_ContentType' is not a subtype of type 'String'
究竟是什么问题一直好好的只要一用dio就不行..
-
创建时间
20年10月11日
-
最后回复
20年11月30日
-
8
回复
-
1.6K
浏览
-
4
用户