overlays property
OverlayManager
overlays
latefinalinherited
A property that stores an OverlayManager
This is useful to render widgets on top of a game, such as a pause menu.
Overlays can be made visible via overlays
.add or hidden via
overlays
.remove.
For example:
final pauseOverlayIdentifier = 'PauseMenu';
overlays.add(pauseOverlayIdentifier); // marks 'PauseMenu' to be rendered.
overlays.remove(pauseOverlayIdentifier); // hides 'PauseMenu'.
Implementation
late final overlays = OverlayManager(this);