Back

account.getPrefs() return map empty on flutter, is this correct behaviour?

  • 0
  • Users
  • Accounts
  • Flutter
  • Cloud
ropi95
1 Jan, 2024, 13:34

im trying to get user preferences, when try to get the prefs, it return empty map. how to get the user preferences correctly?

final result = await account.getPrefs();

the result return {}

thank you

TL;DR
The user is experiencing an issue where the `account.getPrefs()` function in their Flutter app is returning an empty map. They are asking if this is the correct behavior. One user suggests looking into using the shared preferences package, while another asks if any preferences have been set in the Appwrite console. The asker clarifies that they want to retrieve user info from preferences on the client side. To resolve the issue, it is recommended to check if any preferences have been set in the Appwrite console. It is also suggested to consider using the shared preferences package for storing and retrieving preferences in the Flutter app.
Drake
1 Jan, 2024, 23:27

What are the users preferences if you look in the Appwrite console?

ropi95
1 Jan, 2024, 23:28

Not in the console but in client side like flutter... For example i want to get user info from preferences

Drake
1 Jan, 2024, 23:29

Uhhh maybe you need to look into using the shared preferences package?

D5
1 Jan, 2024, 23:30

But do you have set any preferences in the appwrite console? Can you see them from there?

ropi95
1 Jan, 2024, 23:31

Yes i wanto to set to local storage like shared preference... i saw app write have function getPref, i want to get the data from this

ropi95
1 Jan, 2024, 23:31

Any documentation for this?

Drake
1 Jan, 2024, 23:31

Appwrite's preferences !== shared preferences

ropi95
1 Jan, 2024, 23:32

Thanks will take a look

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more