createOverlayPaneSync method

HtmlElement createOverlayPaneSync([
  1. OverlayState state = _defaultConfig
])

Creates and returns an overlay pane DOM element.

Implementation

HtmlElement createOverlayPaneSync([OverlayState state = _defaultConfig]) {
  // Create a detached DIV to use as the overlay host.
  HtmlElement pane = DivElement()
    ..attributes['pane-id'] = _createUniqueId()
    ..classes.add(_paneClassName);

  // Depending on the initial positioning, size, and visibility, apply the
  // state properties to the detached element (we do not need to use a DOM
  // write queue because it is not attached).
  applyStateSync(state, pane);
  containerElement.append(pane);
  return pane;
}