overlays property

OverlayManager get overlays

A property that stores an ActiveOverlaysNotifier

This is useful to render widgets above a game, like a pause menu for example. Overlays visible or hidden via overlays.add or overlays.remove, respectively.

Ex:

final pauseOverlayIdentifier = 'PauseMenu';
overlays.add(pauseOverlayIdentifier); // marks 'PauseMenu' to be rendered.
overlays.remove(pauseOverlayIdentifier); // marks 'PauseMenu' to not be rendered.

See also:

  • GameWidget
  • Game.overlayManager

Implementation

// ignore: invalid_use_of_internal_member
OverlayManager get overlays;