I am a bit new to flutter and I am getting the message
E/flutter (26774): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FormatException: Unexpected character (at character 1)
E/flutter (26774): <br />
E/flutter (26774): ^
In my console when connecting api's for a registration form, this is what I have in my code
Future RegistrationUser() async {
var APIURL = "http://192.168.1.2/xxxxxxxxx/api/xxxxxxx.php";
Map mapeddate = {
'name': _name.text,
'phone': _phone.text,
'email': _email.text,
'pass': _pass1.text,
'type': "applicant",
};
print("JSON DATA: $mapeddate");
http.Response response =
await http.post(Uri.parse(APIURL), body: mapeddate);
var data = jsonDecode(response.body);
print("DATA: ${data}");
}
}
Does anyone know how I can fix this? Any help would be much appreciated.
). Your error seems to point to that opening angular bracket, maybe you added that line somewhere by mistake. – Novice Coder Apr 24 '22 at 13:35