DisplayInfo class

Native display information reported by the device.

Constructors

DisplayInfo({required int widthPixels, required int heightPixels, required double density, required int densityDpi, required double refreshRate, required List<double> supportedRefreshRates, required bool isHdrSupported, required List<String> supportedHdrTypes, double? widthPoints, double? heightPoints, double? nativeScale, int? nativeWidthPixels, int? nativeHeightPixels, double? brightness, bool isIosNative = false})
Creates a display information description.
const
DisplayInfo.fromMap(Map<Object?, Object?> map)
Creates a DisplayInfo from a map returned by the native platform.
factory

Properties

brightness double?
The current screen brightness, usually in the range 0.0 to 1.0.
final
density double
The logical display density scale.
final
densityDpi int
The display density in dots per inch.
final
hashCode int
The hash code for this object.
no setterinherited
heightPixels int
The display height in physical pixels.
final
heightPoints double?
The display height in logical points, when provided by the platform.
final
isHdrSupported bool
Whether the active display reports HDR support.
final
isIosNative bool
Whether this display information came from the iOS native implementation.
final
nativeHeightPixels int?
The native display height in physical pixels, when safely available.
final
nativeScale double?
The native display scale, when safely available.
final
nativeWidthPixels int?
The native display width in physical pixels, when safely available.
final
refreshRate double
The current display refresh rate in hertz.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedHdrTypes List<String>
Readable names for supported HDR types.
final
supportedRefreshRates List<double>
Refresh rates supported by the active display, in hertz.
final
widthPixels int
The display width in physical pixels.
final
widthPoints double?
The display width in logical points, when provided by the platform.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object>
Converts this display information to a map using the native field names.
toString() String
Returns a readable string containing all display fields.
override

Operators

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