Exception: Bad state: field does not exist within the DocumentSnapshotPlatform

Viewed 44

how to create the field in the UserModel document in firestore if it does not exist?

I was Saving UserModel in firestore without a field called isApproved in old version of my app now I updated the app and added a new field to the User Model the problem is when the user has the old version of the app register as a new user the user model is saved to firestore without this new field and the app crash

  StreamProvider<List<UserModel>>, but no `catchError` was provided.

  Exception:
  Bad state: field does not exist within the DocumentSnapshotPlatform
0 Answers
Related