
Hi guys, I tried to user account.get(), but I got Instance of "Account"
instead of userId.
final document = databases.createDocument(
databaseId: '---',
collectionId: '---',
documentId: ID.unique(),
data: {
"userid": "$res",
"name": "test1",
"mileage": "test2",
"date":
"${_selectedDate.day}-${_selectedDate.month}-${_selectedDate.year}",
});
}```

When you run and print the user ID what you get?
try{
final account = await account.get();
print(account.$id);
} catch(e){
print(e);
}

When you run account.get
you're getting back account model instance
https://appwrite.io/docs/models/account

now it works, thanks

i see

Great

[SOLVED ]Can`t get an userId
Recommended threads
- [SOLVED] Access ExecutionStatus of a fun...
I am calling a cloud function from the newest Flutter SDK 20.2.1with the `xasync: false` flag and get the result, but the `execution.status` is not a String and...
- Appwrite isn't accepting the api from se...
Error creating user: AppwriteException: Server Error type: 'general_unknown', response: '{"message":"Server Error","code":500,"type":"general_unknown","versi...
- Subject: Request for temporary quota lif...
Hi Appwrite Team, our nonprofit animal rescue app on Appwrite Cloud is currently throttled due to read‑quota limits, and we need a temporary increase so rescue ...
