physicalGeometry property

  1. @override
Rect physicalGeometry
override

The physical geometry to use for this test.

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

This property and physicalSize are dependent on one another. If both properties are set through their test setters, the final result will be that physicalGeometry determines the location and physicalSize determines the size of the physicalGeometry Rect. If only physicalSize is set, the final result is that the default value of physicalGeometry determines the location and physicalSize determines the size of the physicalGeometry Rect. If only physicalGeometry is set, it will determine both the location and size of the physicalGeometry Rect.

See also:

Implementation

@override
Rect get physicalGeometry {
  Rect value = _physicalGeometry ?? _view.physicalGeometry;
  if (_physicalSize != null) {
    value = value.topLeft & _physicalSize!;
  }
  return value;
}
void physicalGeometry=(Rect value)

Implementation

set physicalGeometry(Rect value) {
  _physicalGeometry = value;
  platformDispatcher.onMetricsChanged?.call();
}