Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform #9

Closed
gangov opened this issue Oct 2, 2020 · 2 comments

Comments

@gangov
Copy link

gangov commented Oct 2, 2020

This is the database in Firestore: link as you can see it is exactly as it's needed;

However upon running the application from chapter 7 on "The EventDetails model class" we get
Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform error message.

The error is caused because there's a missing field 'id' in our FireStore database, but we're trying to assign it from the EventDetail.fromMap named constructor

This needs to be updated, as we as a lot of deprecated code lines, such as getDocuments() (in favor of get()), documents() (in favor of docs()) etc;

@deepesh-packt
Copy link
Collaborator

Hey @gangov ,
the project currently only supports up to Flutter 1.12.

@Shaban-ali
Copy link

yes gangov thank you i solved it by your comment it was spell mistake it was not matching with firestore ids so i change name as in firestore in my code and its work now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants