DeviceInfo class
Info about a device and its frame.
- Available extensions
Constructors
- DeviceInfo.new({required DeviceIdentifier identifier, required String name, 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
- DeviceInfo.genericDesktopMonitor({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericDesktopMonitorFramePainter? framePainter})
-
General Library Documentation Undocument By General Corporation & Global Corporation & General Developer
factory
- DeviceInfo.genericLaptop({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericLaptopFramePainter? framePainter})
-
General Library Documentation Undocument By General Corporation & Global Corporation & General Developer
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()})
-
General Library Documentation Undocument By General Corporation & Global Corporation & General Developer
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()})
-
General Library Documentation Undocument By General Corporation & Global Corporation & General Developer
factory
Properties
- canRotate → bool
-
Available on DeviceInfo, provided by the DeviceInfoExtension extension
Indicates whether the device can rotate.no setter - framePainter → CustomPainter
-
The safe areas when the device is in portrait orientation.
final
- frameSize → Size
-
The frame size in pixels.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → DeviceIdentifier
-
Identifier of the device.
final
- name → String
-
The display name of the device.
final
- pixelRatio → double
-
The screen pixel density of the device.
final
- rotatedSafeAreas → EdgeInsets?
-
The safe areas when the device is in landscape orientation.
final
- 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.
final
- screenPath → Path
-
A shape representing the screen.
final
- screenSize → Size
-
The size in points of the screen content.
final
Methods
-
copyWith(
) → DeviceInfo - General Library Documentation Undocument By General Corporation & Global Corporation & General Developer
-
isLandscape(
Orientation orientation) → bool -
Available on DeviceInfo, provided by the DeviceInfoExtension extension
Indicates whether the current device info should be in landscape. -
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