resize method

void resize(
  1. int width,
  2. int height
)

Changes the size of future frames acquired from this surface.

Existing images returned by currentImage remain valid. The next acquireNextFrame call returns a texture with the new dimensions. This method throws if a frame is currently acquired and has not been presented or discarded.

Implementation

void resize(int width, int height) {
  _checkDimensions(width, height);
  final String? error = _resize(width, height);
  if (error != null) {
    throw StateError(error);
  }
  _width = width;
  _height = height;
}