CustomDeviceInfoData constructor
const
CustomDeviceInfoData({
- required String id,
- required DeviceType type,
- required TargetPlatform platform,
- required String name,
- @Default(null) @NullableEdgeInsetsJsonConverter() EdgeInsets? rotatedSafeAreas,
- @EdgeInsetsJsonConverter() required EdgeInsets safeAreas,
- required double pixelRatio,
- @SizeJsonConverter() required Size screenSize,
Create a new device info.
Implementation
const factory CustomDeviceInfoData({
/// Identifier of the device.
required String id,
/// The device type.
required DeviceType type,
/// The device operating system.
required TargetPlatform platform,
/// The display name of the device.
required String name,
/// The safe areas when the device is in landscape orientation.
@Default(null)
@NullableEdgeInsetsJsonConverter()
EdgeInsets? rotatedSafeAreas,
/// The safe areas when the device is in portrait orientation.
@EdgeInsetsJsonConverter() required EdgeInsets safeAreas,
/// The screen pixel density of the device.
required double pixelRatio,
/// The size in points of the screen content.
@SizeJsonConverter() required Size screenSize,
}) = _CustomDeviceInfoData;