TestViewConfiguration.fromView constructor

TestViewConfiguration.fromView(
  1. {required FlutterView view,
  2. Size size = _kDefaultTestViewportSize}
)

Creates a TestViewConfiguration with the given size and view.

The size defaults to 800x600.

Implementation

TestViewConfiguration.fromView({required ui.FlutterView view, Size size = _kDefaultTestViewportSize})
    : _paintMatrix = _getMatrix(size, view.devicePixelRatio, view),
      _physicalSize = view.physicalSize,
      super(
        devicePixelRatio: view.devicePixelRatio,
        logicalConstraints: BoxConstraints.tight(size),
        physicalConstraints: BoxConstraints.tight(size) * view.devicePixelRatio,
    );