shouldListenForFullscreenChanges property

  1. @Input('listenForFullscreenChanges')
set shouldListenForFullscreenChanges (bool shouldListenForFullscreenChanges)

Determines whether to listen for when the dialog enters or exits fullscreen mode.

Implementation

@Input('listenForFullscreenChanges')
set shouldListenForFullscreenChanges(bool shouldListenForFullscreenChanges) {
  // Don't do anything if [shouldListenForFullscreenChanges] is set to false.
  if (!shouldListenForFullscreenChanges) return;

  // If [_shouldListenForFullscreenChanges] is set to true, then that means
  // that we're already listening to fullscreen changes, so don't do anything.
  if (_shouldListenForFullscreenChanges) return;

  _shouldListenForFullscreenChanges = shouldListenForFullscreenChanges;
  _disposer.addStreamSubscription(window.onResize.listen((_) {
    _listenForFullscreenChanges();
  }));
}