nullableDevicePixelRatio property
double?
nullableDevicePixelRatio
Returns the device pixel ratio for the nearest MediaQuery ancestor or null if no such ancestor exists.
Implementation
double? get nullableDevicePixelRatio =>
MediaQuery.maybeDevicePixelRatioOf(this);