Getting error on accessing $ prefixed fields while using Dart for Appwrite.
- 0
- Flutter
- Functions
- Cloud
I am using dart 2.17 for creating appwrite function,
Usecase:
- Trying to create use document on every user creation.
Error:
- When i try to access '$id' field of user from event data i am getting error shown in screenshot.
- Interesting thing is when i log the same id with context.log it is working fine
If you guys can suggest how should i write functions with dart so that i can use inbuild models like user and others ,if possible please share similar kind of working function.
Getting error on accessing $ prefixed fields while using Dart for Appwrite.
Can you try to remove the .toString(), and see if it works?
Super weird that it works with context.log and not when assigning
Holy s*** ,while reading the code i found that i have called $id directly on user object
In the permissions object?
Yes and after changing that it is working
Ah okay
Yeah iβve been in similar situations and itβs such a shocker realizing the silly mistake π©π
Thanks for response i m closing this silly issue
hahaha no worries ππ
Recommended threads
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Missing Invoice
Hi! I need help with billing on my account (marelu@gmail.com). I have never received a single invoice by email. My organization has been on the Pro plan since...
- Appwrite Functions cold start
Hello. I'm seeing really long cold starts on Appwrite Cloud Functions and wanted to know if this is expected. My function just authenticates the user, fetches ...