You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead, the actual preferences returned are: prefsUpdatedUser.prefs => {"data": {"data": {"name" : "Erhan"}}}
How exactly are you printing that data?
This looks expected to me because account.updatePrefs() returns a User and User has a prefs property that is a Preferences object and Preferences has a Map<string, dynamic> data property.
Part of the reason why there's this data property is because Dart is statically typed so we have to nest the dynamic data in the data property.
👟 Reproduction steps
Running the following code in a Flutter project:
Running the code to update user preferences.
👍 Expected behavior
The user preferences should be:
prefsUpdatedUser.prefs => {"data": {"name" : "Erhan"}}
👎 Actual Behavior
Instead, the actual preferences returned are:
prefsUpdatedUser.prefs => {"data": {"data": {"name" : "Erhan"}}}
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
MacOS
🧱 Your Environment
I'm working on a Flutter project using Visual Studio Code with appwrite: ^13.0.0.
The issue can be easily resolved by sending the correct format of prefs. However, it creates confusion when working according to the references provided, which is why I believe this is a bug and wanted to report it:
https://appwrite.io/docs/references/cloud/models/user
https://appwrite.io/docs/references/1.6.x/models/preferences
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: