ResoCoder / flutter-ddd-firebase-course

https://resocoder.com/flutter-firebase-ddd-course
GNU General Public License v3.0
470 stars 161 forks source link

NoteFailure.unexpected: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast #19

Closed derhelge closed 3 years ago

derhelge commented 3 years ago

Hi there,

first things first: A million thanks for the great tutorial.

I'm currently running into a bug that seems to affect this repository as well:

A call after login generates an unexpected error: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List' in type cast

It seems that a feature in freezed is missing here? https://github.com/rrousselGit/freezed/issues/292

I cant figure out a clean way to solve this issue.... Maybe its also a completely different problem (:

derhelge commented 3 years ago

Okay... Going for a walk helped me. My problem had nothing to do with the code base, but was triggered by Firestore: my data structure was wrong and that triggered the error. That's why the error message made complete sense.

Waruna-Kaushalya commented 2 years ago

@derhelge I'm stuck there too. How to get rid of this? What changes have you made to the data structure? 😔

derhelge commented 2 years ago

Hey @Waruna-Kaushalya i cant remember it 100% but i guess you missed one "sub-folder". Think of the Firebase database as a JSON file/dictionary, then you know how to set it up.

Waruna-Kaushalya commented 2 years ago

Thank you @derhelge . I'll Check.