Raxol.Core.Preferences.Store (Raxol v0.5.0)

View Source

Handles storage and retrieval of user preferences.

Summary

Functions

Retrieves all user preferences as a map.

Retrieves a user preference by key or key path. Example: get_preference(:theme) or get_preference([:accessibility, :high_contrast])

Resets all preferences to defaults (by clearing and saving defaults).

Sets a user preference by key or key path. Example: set_preference(:theme, "dark") or set_preference([:accessibility, :high_contrast], true)

Functions

get_all_preferences()

Retrieves all user preferences as a map.

get_preference(key_or_path)

Retrieves a user preference by key or key path. Example: get_preference(:theme) or get_preference([:accessibility, :high_contrast])

reset_preferences()

Resets all preferences to defaults (by clearing and saving defaults).

save_to_preferences(config)

@spec save_to_preferences(map() | struct()) :: :ok

set_preference(key_or_path, value)

Sets a user preference by key or key path. Example: set_preference(:theme, "dark") or set_preference([:accessibility, :high_contrast], true)