PreviewDevice class

A device that can be used to preview the app

Constructors

PreviewDevice({required String name, required double pixelRatio, required Size size, required TargetPlatform targetPlatform, required double textScaleFactor, required Brightness brightness, required bool hasHomeIndicator, Key? key})
Creates a device that can be used to preview the app
const
PreviewDevice.android6_7inch({Key? key, double textScaleFactor = 1, Brightness brightness = Brightness.light, Orientation orientation = Orientation.portrait})
Creates an Android 6.7 inch device
factory
PreviewDevice.iPhone5_5inch({Key? key, double textScaleFactor = 1, Brightness brightness = Brightness.light, Orientation orientation = Orientation.portrait})
Creates an iPhone 5.5 inch device
factory
PreviewDevice.iPhone6_7inch({Key? key, double textScaleFactor = 1, Brightness brightness = Brightness.light, Orientation orientation = Orientation.portrait})
Creates an iPhone 6.7 inch device
factory

Properties

brightness Brightness
The brightness of the device
final
hashCode int
The hash code for this object.
no setterinherited
hasHomeIndicator bool
Whether the device has a home indicator
final
key Key?
The key of the PreviewDevice
final
name String
The name of the device
final
pixelRatio double
The pixel ratio of the device
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
The screen size of the device
final
targetPlatform TargetPlatform
The target platform of the device
final
textScaleFactor double
The text scale factor of the device
final

Methods

copyWith({ValueGetter<Key?>? key, String? name, double? pixelRatio, Size? size, TargetPlatform? targetPlatform, double? textScaleFactor, Brightness? brightness, bool? hasHomeIndicator}) PreviewDevice
Creates a copy of this PreviewDevice but with the given fields replaced with the new values.
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.
inherited