targetDevicePixelRatio property

double? targetDevicePixelRatio
final

The device pixel ratio that this asset is most ideal for. This is determined by the name of the parent folder of the asset file. For example, if the parent folder is named "3.0x", the target device pixel ratio of that asset will be interpreted as 3.

This will be null if the parent folder name is not a ratio value followed by an "x".

See Resolution-aware image assets for more information.

Implementation

final double? targetDevicePixelRatio;