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'),
);
}