physicalSize property

  1. @override
Size physicalSize

The physical size to use for this test.

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

Setting this value also sets physicalConstraints to tight constraints based on the given size.

See also:


Size get physicalSize => _physicalSize ?? _view.physicalSize;
void physicalSize=(Size value)


set physicalSize(Size value) {
  _physicalSize = value;
  // For backwards compatibility the constraints are set based on the provided size.
  physicalConstraints = ViewConstraints.tight(value);