我得到了这样的按摩:
[错误:flutter/lib/ui/ui_dart_state. cc(198)]未处理的异常:DioError [DioError类型响应]:HTTP状态错误[403]
下面是loginCall方法:
Future<LoginModel?> loginCall(
String email,
String password,
) async {
Map<String, dynamic> json = {"email": email, "hashPass": password};
var response = await dio.post(baseUrl + "login", data: json);
print(response.data);
print(response.statusCode);
if (response.statusCode == 200) {
var result = LoginModel.fromJson(response.data);
print("gelen response: ${response.data}");
return result;
} else {
throw Exception("Error! ${response.statusCode}");
}
}
1条答案
按热度按时间1qczuiv01#
错误403通常意味着未授权。2因此,您可能输入了不正确的电子邮件和密码组合。