try {
print(model.toJson());
Document result = await databases.createDocument(
databaseId: Appwrite.kDatabaseId,
collectionId: Appwrite.kClientsCollection,
documentId: ID.unique(),
data: model.toJson(),
permissions: []
);
if (result.$id.isNotEmpty) {
return ClientModel.fromJson(result.data);
}
} on AppwriteException catch (e) {
print(e.toString());
}
return null;
}```
i print out the model. and there is data
I'm not sure I understand what your issues is, can you please expand?
so I send payload to appwrite creating document. I print the model. print(model.toJson()); I clearly can see the json payload. then it also created document sucessfully. the problem is after creation new document. all fields are null.
any way to monitor what is being sent inside appwrite container
They're null in the Appwrite console too?
yes, also null
Can you JSON encode the map?
And also share your collection as JSON (result of get collection API call)
do you mean this
JSON encode please
do you mean JSON encode the model I submit to appwrite, or return from appwrite?
Both
encoding problem.
Sorry what do you mean?
And it would help if you copied and pasted instead of sharing a screenshot
okay. wait
I think these are 3 log messages? What are they of?
ignore that. let me make it clean
now it is okay by changing _formKey.currentState!.value to _formKey.currentState!.instantValue (flutter form builder)
but strange , i clearly print the log right here
but feel unsecure what happend.😂
Recommended threads
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...
- Does 1.9.0 Self Hosted have MongoDB Atla...
I have been playing with the new 1.9.0 update and I am really excited for the MongoDB support. I wanted to ask though if at the current time Appwrite supports b...