Questions
nicolez4nicolez4asked 4 months ago
The method document isn’t defined for the type CollectionReference. Try correcting the name to the name of an existing method, or defining a method named document. dartundefined_method flutter-document-error-doc  
1

1 Answers

Accepted
codegenlabcodegenlabanswered 4 months ago
You can fix this by changing,
.document()
to
doc()
like this,
await db.collection("userData").doc(uid).collection("trips").add(locklistModel.toJson());
1