measureContainer method

Future<Rectangle<num>> measureContainer()

Returns the current size of the overlay container.

By default this is normally the viewport, but in some apps the container may be different dimensions (such as multiple apps alive at the same time).

Implementation

Future<Rectangle> measureContainer() {
  if (!_useDomSynchronously) {
    return _domService
        .onWrite()
        .then((_) => containerElement.getBoundingClientRect());
  } else {
    return Future<Rectangle>.value(containerElement.getBoundingClientRect());
  }
}