createOverlayRef method

Future<OverlayRef> createOverlayRef([
  1. OverlayState initialState = _defaultState
])

Creates an overlay pane within the registered container.

If initialState is specified, configuration for the overlay is setup on creation, versus waiting for the future to resolve. initialState may also be a MutableOverlayState, in which case it is not copied, but used as the state instance.

The returned future completes with a reference to the pane.

Implementation

Future<OverlayRef> createOverlayRef(
    [OverlayState initialState = _defaultState]) async {
  HtmlElement pane = await _renderService.createOverlayPane(initialState);
  return _createRef(pane, initialState);
}