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})
-
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})
-
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})
-
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
- canRotate → bool
-
Available on DeviceInfo, provided by the DeviceInfoExtension extension
Indicates whether the device can rotate.no setter - framePainter → CustomPainter
-
final
- frameSize → Size
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- identifier → DeviceIdentifier
-
final
- name → String
-
final
- pixelRatio → double
-
final
- rotatedSafeAreas → EdgeInsets?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeAreas → EdgeInsets
-
final
- screenPath → Path
-
final
- screenSize → Size
-
final
Methods
-
copyWith(
{DeviceIdentifier? identifier, String? name, EdgeInsets? rotatedSafeAreas, EdgeInsets? safeAreas, Path? screenPath, double? pixelRatio, CustomPainter? framePainter, Size? frameSize, Size? screenSize}) → DeviceInfo -
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override