devicePixelRatio property
override
The device pixel ratio to use for this test.
Defaults to the value provided by FlutterView.devicePixelRatio. This can only be set in a test environment to emulate different view configurations. A standard FlutterView is not mutable from the framework.
See also:
- FlutterView.devicePixelRatio for the standard implementation
- TestDisplay.devicePixelRatio which will stay in sync with this value
- resetDevicePixelRatio to reset this value specifically
- reset to reset all test values for this view
Implementation
@override
double get devicePixelRatio => _display._devicePixelRatio ?? _view.devicePixelRatio;
Implementation
set devicePixelRatio(double value) {
_display.devicePixelRatio = value;
}