DEV Community

roberto110957
roberto110957

Posted on

requisicoes post

ESTOU COM UM PROBLEMA EM UM ARQUIVO DART

Future ConsultaLogin(emailtxt, senhatxt) async {
if (emailtxt.text == "" || senhatxt.text == "") {
String uri = "http://192.168.15.153/axd_admin/lib/php/login.php";
var res = await http.post(Uri.parse(uri), body: {
"email": emailtxt.text,
"senha": senhatxt.text,
"headers": {"Accept": "application/json"},
});
var response = jsonDecode(res.body);
if (response["usu" != "LOGIN INVALIDO!"]) {
debugPrint("ok");
} else {
debugPrint("nao existe login");
}
}
}

qdo envio da esse erro "errors.dart:294 Uncaught (in promise) Error: Expected a value of type 'String', but got one of type 'IdentityMap'"

alguem poderia me ajudar, no arquivo php esta ok

Top comments (0)