Skip to content

SharedPreferences

SharedPreferences #

Bases: Service

data #

data: Any = skip_field()

Arbitrary data of any type.

key #

key: KeyValue | None = None

page #

page: Page | PageView | None

The page (of type Page or PageView) to which this control belongs to.

parent #

parent: BaseControl | None

The direct ancestor(parent) of this control.

It defaults to None and will only have a value when this control is mounted (added to the page tree).

The Page control (which is the root of the tree) is an exception - it always has parent=None.

before_event #

before_event(e: ControlEvent)

before_update #

before_update()

This method is called every time when this control is being updated.

Note

Make sure not to call/request an update() here.

clear #

clear() -> None

clear_async #

clear_async() -> bool

contains_key_async #

contains_key_async(key: str) -> bool

did_mount #

did_mount()

get_async #

get_async(key: str)

get_keys_async #

get_keys_async(key_prefix: str) -> list[str]

init #

init()

is_isolated #

is_isolated()

remove #

remove(key: str) -> None

remove_async #

remove_async(key: str) -> bool

set #

set(key: str, value: Any) -> None

set_async #

set_async(key: str, value: Any) -> bool

update #

update() -> None

will_unmount #

will_unmount()