setSize method

void setSize(
  1. int width,
  2. int? height
)

Updates viewport dimensions.

Implementation

void setSize(int width, int? height) {
  if (_model.width == width && _model.height == height) return;
  _model = _model.copyWith(width: width, height: height);
}