DevicePreviewData constructor

const DevicePreviewData({
  1. @Default(true) bool isToolbarVisible,
  2. @Default(true) bool isEnabled,
  3. @Default(Orientation.portrait) Orientation orientation,
  4. String? deviceIdentifier,
  5. @Default('en-US') String locale,
  6. @Default(true) bool isFrameVisible,
  7. @Default(false) bool isDarkMode,
  8. @Default(false) bool boldText,
  9. @Default(false) bool isVirtualKeyboardVisible,
  10. @Default(false) bool disableAnimations,
  11. @Default(false) bool highContrast,
  12. @Default(false) bool accessibleNavigation,
  13. @Default(false) bool invertColors,
  14. @Default(<String, Map<String, dynamic>>{}) Map<String, Map<String, dynamic>> pluginData,
  15. @Default(1.0) double textScaleFactor,
  16. DevicePreviewSettingsData? settings,
  17. @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;