I am facing a anonymus closure error in flutter while signing in a user. It worked a few days before but now its not working, I dont no why. So please help and thanks in advance
I also have similar type of error, Be make sure that the argument of .decode method shouldn't be empty object. Instead of using this line:
.decode
var body = json.decode(response.body);
Try
if(response.body.isNotEmpty) { json.decode(response.body); }
Do try this, hope it will work for you.