rect property

Rectangle<int> get rect

The location and size of the window.

Implementation

Rectangle<int> get rect {
  try {
    return _client.send(_handler.window.buildRectRequest(),
        _handler.window.parseRectResponse);
  } on UnsupportedError {
    // JsonWire cannot implement this API in one call.
    // Delegate to other methods.
    final location = this.location;
    final size = this.size;
    return Rectangle<int>(location.x, location.y, size.width, size.height);
  }
}
set rect (Rectangle<int> value)

The location and size of the window.

Implementation

set rect(Rectangle<int> value) {
  try {
    _client.send(_handler.window.buildSetRectRequest(value),
        _handler.window.parseSetRectResponse);
    return;
  } on UnsupportedError {
    // JsonWire cannot implement this API in one call.
    // Delegate to other methods.
    location = value.topLeft;
    size = Rectangle(0, 0, value.width, value.height);
  }
}