devicePixelRatio property

  1. @override
double devicePixelRatio
override

The device pixel ratio to use for this test.

Defaults to the value provided by Display.devicePixelRatio. This can only be set in a test environment to emulate different display configurations. A standard Display is not mutable from the framework.

See also:

Implementation

@override
double get devicePixelRatio => _devicePixelRatio ?? _display.devicePixelRatio;
void devicePixelRatio=(double value)

Implementation

set devicePixelRatio(double value) {
  _devicePixelRatio = value;
  _platformDispatcher.onMetricsChanged?.call();
}