onForeground property

void Function(bool foreground)? onForeground
final

Fires when the app enters (true) or leaves (false) the foreground while the game is open, for the window's dwell time.

Implementation

final void Function(bool foreground)? onForeground;