Skip to content

Settings API

Andy Williams edited this page Mar 23, 2019 · 20 revisions

To provide a clean and consistent API for settings and storage we need to be clear about what is application local (user preferences) vs global (system settings). Also some things can be set by environment variables to override settings.

App.Preferences

Get(key):value access a user configuration that was stored previously.

Set(key, value) would allow an application to store a user configuration for later access.

Typed versions (like GetFloat or SetBool) could improve the API.

We should support complex types as well - see JSON or XML marshalling for potential inspiration.

App.Storage

A place where an application can get storage access information / functions

Cache

The correct location to cache documents or assets that you don't want to keep in memory.

Documents

A place where the application can store user documents - within the standard user documents directory.

fyne.Settings

Theme

The user can set their preferred theme that will apply to applications if they don't override.

It can be overridden by the user with FYNE_THEME. It can also be set by the application if the developer wants to use a custom theme.

Welcome to the Fyne wiki.

Project documentation

Getting involved

Platform details

Clone this wiki locally