overlayManager property

  1. @override
OverlayManager get overlayManager
override

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

@override
// ignore: invalid_use_of_internal_member
OverlayManager get overlayManager => overlays;