useLogicalSize property

bool useLogicalSize
final

Whether width and height are interpreted as logical pixels.

When false (the default), width and height are treated as physical pixels. On high-density displays, this can result in images being decoded at fewer pixels than the screen can render, producing lower-quality output. When true, width and height are multiplied by the device pixel ratio from the current ImageConfiguration, so the image is decoded at the resolution that matches the rendered display.

Typically in the framework, pixel dimensions are interpreted as logical rather than physical. However, this defaults to physical for backwards compatibility.

Implementation

final bool useLogicalSize;