Error: List is not a subtype of type Map

API returns JSON array not json object so that is List not Map.

i.e. User json is first element of Json Array.

So to get first element use first index.
Inside fetch Info update

return Users.fromJson(jsonresponse[0]);

Leave a Comment