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
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...