Open giorgio79 opened 1 year ago
I've got a similar issue. I guess it's not really Firebase specific, it's an issue whenever you have nested json objects and deserialisation fails because a non-nullable field is null. Ideally there would be an indication of what field was missing and where in the json structure the missing field was expected.
I suppose this can be somewhat improved by manually wrapping each nested objects fromJson in a try/catch but you still won't know which field was missing and in my case the model classes are generated automatically so adding the try/catch statements is not possible without a change to the model generator.
Hello,
I have a complex object and when reading from Firebase, I started getting this error
type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast
Its quite cryptic, no error line in the object_g.dart file, or the actual propert name. How could I debug this? (without printing each item one by one?)