Issue
I am new in Flutter. I face a problem about Flutter: Unhandled Exception: FormatException: Unexpected character (at character 1).
This is my Debug Console:
E/flutter ( 8328): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FormatException: Unexpected character (at character 1)
E/flutter ( 8328): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
E/flutter ( 8328): ^
E/flutter ( 8328):
E/flutter ( 8328): #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1405:5)
E/flutter ( 8328): #1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1272:9)
E/flutter ( 8328): #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:937:22)
E/flutter ( 8328): #3 _parseJson (dart:convert-patch/convert_patch.dart:40:10)
E/flutter ( 8328): #4 JsonDecoder.convert (dart:convert/json.dart:612:36)
E/flutter ( 8328): #5 JsonCodec.decode (dart:convert/json.dart:216:41)
E/flutter ( 8328): #6 jsonDecode (dart:convert/json.dart:155:10)
E/flutter ( 8328): #7 _UserCreateEnquiryScreenState.build.<anonymous closure>.<anonymous closure>
package:dragon_lyz_app/…/user/user_create_enquiry_screen.dart:112
E/flutter ( 8328): #8 _rootRunUnary (dart:async/zone.dart:1434:47)
E/flutter ( 8328): #9 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter ( 8328): <asynchronous suspension>
E/flutter ( 8328):
How do I fix it?
Solution
Well, you fix it by not parsing an HTML text as JSON in your build
method of the _UserCreateEnquiryScreenState
class.
Since you posted no code and no other explanation, that is all the help we can give you.
Answered By - nvoigt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.