DeviceInfo class abstract

Info about a device and its frame.

Available Extensions
Annotations
  • @freezed

Constructors

DeviceInfo({required DeviceIdentifier identifier, required String name, @Default(null) EdgeInsets? rotatedSafeAreas, required EdgeInsets safeAreas, required Path screenPath, required double pixelRatio, required CustomPainter framePainter, required Size frameSize, required Size screenSize})
Create a new device info.
const
factory
DeviceInfo.genericDesktopMonitor({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericDesktopMonitorFramePainter? framePainter})
factory
DeviceInfo.genericLaptop({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericLaptopFramePainter? framePainter})
factory
DeviceInfo.genericPhone({required TargetPlatform platform, required String id, required String name, required Size screenSize, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericPhoneFramePainter framePainter = const GenericPhoneFramePainter()})
factory
DeviceInfo.genericTablet({required TargetPlatform platform, required String id, required String name, required Size screenSize, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericTabletFramePainter framePainter = const GenericTabletFramePainter()})
factory

Properties

copyWith → $DeviceInfoCopyWith<DeviceInfo>
no setterinherited
framePainter CustomPainter
The safe areas when the device is in portrait orientation.
no setterinherited
frameSize Size
The frame size in pixels.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
identifier DeviceIdentifier
Identifier of the device.
no setterinherited
name String
The display name of the device.
no setterinherited
pixelRatio double
The screen pixel density of the device.
no setterinherited
rotatedSafeAreas EdgeInsets?
The safe areas when the device is in landscape orientation.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeAreas EdgeInsets
The safe areas when the device is in portrait orientation.
no setterinherited
screenPath Path
A shape representing the screen.
no setterinherited
screenSize Size
The size in points of the screen content.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited