DevicePreviewData constructor
const
DevicePreviewData({
- @Default(true) bool isToolbarVisible,
- @Default(true) bool isEnabled,
- @Default(Orientation.portrait) Orientation orientation,
- String? deviceIdentifier,
- @Default('en-US') String locale,
- @Default(true) bool isFrameVisible,
- @Default(false) bool isDarkMode,
- @Default(false) bool boldText,
- @Default(false) bool isVirtualKeyboardVisible,
- @Default(false) bool disableAnimations,
- @Default(false) bool highContrast,
- @Default(false) bool invertColors,
- @Default(<String, Map<String, dynamic>>{}) Map<
String, Map< pluginData,String, dynamic> > - @Default(1.0) double textScaleFactor,
- DevicePreviewSettingsData? settings,
- @Default(null) CustomDeviceInfoData? customDevice,
Create a new DevicePreviewData configuration from all properties.
Implementation
const factory DevicePreviewData({
/// Indicate whether the toolbar is visible.
@Default(true) bool isToolbarVisible,
/// Indicate whether the device simulation is enabled.
@Default(true) bool isEnabled,
/// The current orientation of the device
@Default(Orientation.portrait) Orientation orientation,
/// The currently selected device.
String? deviceIdentifier,
/// The currently selected device locale.
@Default('en-US') String locale,
/// Indicate whether the frame is currently visible.
@Default(true) bool isFrameVisible,
/// Indicate whether the mode is currently dark.
@Default(false) bool isDarkMode,
/// Indicate whether texts are forced to bold.
@Default(false) bool boldText,
/// Indicate whether the virtual keyboard is visible.
@Default(false) bool isVirtualKeyboardVisible,
/// Indicate whether animations are disabled.
@Default(false) bool disableAnimations,
/// Indicate whether the highcontrast mode is activated.
@Default(false) bool highContrast,
/// Indicate whether the navigation is in accessible mode.
@Default(false) bool accessibleNavigation,
/// Indicate whether image colors are inverted.
@Default(false) bool invertColors,
/// Indicate whether image colors are inverted.
@Default(<String, Map<String, dynamic>>{})
Map<String, Map<String, dynamic>> pluginData,
/// The current text scaling factor.
@Default(1.0) double textScaleFactor,
DevicePreviewSettingsData? settings,
/// The custom device configuration
@Default(null) CustomDeviceInfoData? customDevice,
}) = _DevicePreviewData;