I try to navigate to WelcomeScreen after the user successfully signup, but it does not do so although it works fine with Login screen and I receive this error :
I/flutter ( 5046): FormatException: Unexpected character (at character 1) I/flutter ( 5046): user added successfully I/flutter ( 5046): ^'
here is my code:
Future signup(BuildContext cont) async{
  var url = "http://10.0.2.2:8080/localconnect/signup.php";
  var response = await http.post(url, body: {
    'username' : username.text,
    'password' : password.text,
  });
  try {
    var data = jsonDecode(response.body);
    Navigator.push(cont, MaterialPageRoute(builder: (context)=>WelcomeScreen()));
  }catch(e){
    print(e);
  }
}