DisplayInfo.fromMap constructor
Creates a DisplayInfo from a map returned by the native platform.
Implementation
factory DisplayInfo.fromMap(Map<Object?, Object?> map) {
return DisplayInfo(
widthPixels: _readInt(map, 'widthPixels'),
heightPixels: _readInt(map, 'heightPixels'),
density: _readDouble(map, 'density'),
densityDpi: _readInt(map, 'densityDpi'),
refreshRate: _readDouble(map, 'refreshRate'),
supportedRefreshRates: _readDoubleList(map, 'supportedRefreshRates'),
isHdrSupported: _readBool(map, 'isHdrSupported'),
supportedHdrTypes: _readStringList(map, 'supportedHdrTypes'),
widthPoints: _readOptionalDouble(map, 'widthPoints'),
heightPoints: _readOptionalDouble(map, 'heightPoints'),
nativeScale: _readOptionalDouble(map, 'nativeScale'),
nativeWidthPixels: _readOptionalInt(map, 'nativeWidthPixels'),
nativeHeightPixels: _readOptionalInt(map, 'nativeHeightPixels'),
brightness: _readOptionalDouble(map, 'brightness'),
isIosNative: _readBool(map, 'isIosNative'),
);
}