setRect method

Future<void> setRect(
  1. Rectangle<int> rect
)

The location and size of the window.

Implementation

Future<void> setRect(Rectangle<int> rect) async {
  try {
    await _client.send(_handler.window.buildSetRectRequest(rect),
        _handler.window.parseSetRectResponse);
    return;
  } on UnsupportedError {
    // JsonWire cannot implement this API in one call.
    // Delegate to other methods.
    await setLocation(rect.topLeft);
    await setSize(Rectangle(0, 0, rect.width, rect.height));
  }
}