DeviceInfo constructor

const DeviceInfo({
  1. required DeviceIdentifier identifier,
  2. required String name,
  3. @Default(null) EdgeInsets? rotatedSafeAreas,
  4. required EdgeInsets safeAreas,
  5. required Path screenPath,
  6. required double pixelRatio,
  7. required String svgFrame,
  8. required Size frameSize,
  9. required Size screenSize,
})

Create a new device info.

Implementation

const factory DeviceInfo({
  /// Identifier of the device.
  required DeviceIdentifier identifier,

  /// The display name of the device.
  required String name,

  /// The safe areas when the device is in landscape orientation.
  @Default(null) EdgeInsets? rotatedSafeAreas,

  /// The safe areas when the device is in portrait orientation.
  required EdgeInsets safeAreas,

  /// A shape representing the screen.
  required Path screenPath,

  /// The screen pixel density of the device.
  required double pixelRatio,

  /// The safe areas when the device is in portrait orientation.
  required String svgFrame,

  /// The frame size in pixels.
  required Size frameSize,

  /// The size in points of the screen content.
  required Size screenSize,
}) = _DeviceInfo;