OverlayService constructor

OverlayService(
  1. NgZone _ngZone,
  2. @Inject(overlaySyncDom) Object useDomSynchronously,
  3. OverlayDomRenderService _renderService,
  4. @SkipSelf() @Optional() OverlayService? existingInstance,
)

Implementation

OverlayService(
    this._ngZone,
    @Inject(overlaySyncDom) Object useDomSynchronously,
    this._renderService,
    @SkipSelf() @Optional() OverlayService? existingInstance) {
  assert(() {
    // Overlay service should not be injected if it is already available
    if (existingInstance != null) {
      _logger.severe('OverlayService must be a singleton: '
          'Remove nested OverlayService providers such as overlayBindings, '
          'popupBindings, datepickerBindings or materialProviders');
    }
    return true;
  }());
  if (useDomSynchronously is bool) {
    this._useDomSynchronously = useDomSynchronously;
  }
}