Skip to main content

Module platform

Module platform 

Source
Expand description

Global platform provider: use_platform() and set_platform() (D105).

Widgets never branch on platform directly — the running platform exists only to drive THEME resolution (a platform-keyed Themes bundle picks the active ThemeData once at startup). This mirrors the safe_area provider’s shape exactly: a detected default, overridable, read through a GlobalAtom so it’s cheap and consistent everywhere.

Enums§

Platform
The platform ROSACE is running on.

Functions§

set_platform
Overrides the active platform. Called by App::platform(..) at startup; app code should not normally need this directly.
use_platform
Returns the currently active platform — the real detected one unless overridden via set_platform (e.g. App::platform(Platform::Ios) to preview an iOS theme on desktop).