I am trying to get the JSON response from the server and output it to the console.
Future login() async {
var response = await http.get(
I had the same error using json_annotation, json_serializable, build_runner. It occurs when calling the ClassName.fromJson() method for a class that had a class property (example: class User has a property class Address).
As a solution, I modified the generated *.g.dart files of each class, by changing Map to Map in everywhere there is a deep conversion inside the method _$*FromJson
The only problem is that you have to change it again every time you regenerate your files.