skip to Main Content

In my code in flutter App, although Jason has a value and is not empty, it gives a null error. What is the reason for this?

Error:
_TypeError (type ‘Null’ is not a subtype of type ‘String’)

enter image description here

the Future is:
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    The key in the map is case sensitive.


  2. Seems like your result is an array instead of map, which may cause json[‘question’] return null:
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search