Unhandled Exception: FormatException: Unexpected character (at character 1) Flutter

561

You're first character is a <br>, so it's not a json or strong, could be a 404 error html page, which can't be parsed. Double check the URL you are pinging.

Share:
561
BootCamp
Author by

BootCamp

Updated on December 28, 2022

Comments

  • BootCamp
    BootCamp over 1 year

    I'm having a trouble why I'm getting this error and I'm following this an old source like like.It is possible that the syntax of old version is not the same that been using now programitically? It would be great if anybody could figure out, thank you so much in advance!.

    enter image description here

    There are the list of error when I clicked those error in my console

    json.dart

      dynamic convert(String input) => _parseJson(input, _reviver);
    

    json.dart

        if (reviver == null) return decoder.convert(source);
        return JsonDecoder(reviver).convert(source);
    

    main.dart

    var datauser = json.decode(response.body);
    
  • BootCamp
    BootCamp about 3 years
    thanks I just review my file and I forgot to put semi-colon thanks!
  • Huthaifa Muayyad
    Huthaifa Muayyad about 3 years
    You're most welcome! If it helped you solve your problem, kindly consider marking it as the correct answer. Happy coding.