Try Install Learn Blog API Packages GitHub
Pages

Ui

Represents the store which all components connect to.

States

darkMode
:
Bool
=
true

Wether or not to show dark mode.

Window.addMediaQueryListener( "(max-width: 1000px)", (active : Bool) { next { mobile = active } })

A media query listener for to set mobile property.

mobile
:
Bool
=
Window.matchesMediaQuery("(max-width: 1000px)")

Wether or not we are in a mobile view.

Functions

disabledHandler
(
disabled
:
Bool
handler
:
Function(a, Promise(Never, Void))
)
:
Function(a, Promise(Never, Void))

A function to not do anything based on a disabled argument.

resolveTheme
(
theme
:
Ui.Theme
)

Resolves a theme.

setDarkMode
(
value
:
Bool
)
:
Promise(Never, Void)

Sets the dark mode state.