Settings

Information

These methods are accessible through profile.settings() and wallet.settings() which expose a SettingRepository instance.

Get a list of all settings with key and value

1profile.settings().all();

Get a list of all setting keys

1profile.settings().keys();

Get a list of all setting values

1profile.settings().values();

Get the value for the given key

1profile.settings().get("theme", "light");

Set the value for the given key

1profile.settings().set("theme", "dark");

Check if a setting for the given key exists

1profile.settings().has("theme");

Forget the value for the given key

1profile.settings().forget("theme");

Forget all settings (Use with caution!)

1profile.settings().flush();
Last updated 2 years ago
Edit Page
Share: