DevicePreviewStateHelperExtensions extension
A set of extension to triggers updates of the state.
Properties
- data ↔ DevicePreviewData
-
Access to the current state's data.
getter/setter pair
- deviceInfo → DeviceInfo
-
The currently selected device from the
availableDevices
.no setter -
devices
→ List<
DeviceInfo> -
Access to all available devices.
no setter
- isCustomDevice → bool
-
Indicate whether the current device is a custom one.
no setter
- locale → Locale
-
Get the currently selected locale from state's data.
no setter
-
locales
→ List<
NamedLocale> -
Access to all available locales.
no setter
- settings ↔ DevicePreviewSettingsData
-
Access to device preview settings from state's data.
getter/setter pair
Methods
-
enableCustomDevice(
) → void - Activate the custom device mode.
-
rotate(
) → void - Change the simulated device orientation between portrait and landscape.
-
selectDevice(
DeviceIdentifier id) → void - Select the current device.
-
toggleDarkMode(
) → void - Switch from light to dark mode.
-
toggleFrame(
) → void - Hide or show the current device frame.
-
toggleVirtualKeyboard(
) → void - Hide or show the virtual keyboard.
-
updateCustomDevice(
CustomDeviceInfoData data) → void - Updates the custom device configuration.