initGameStateListener static method
Visible for testing for https://github.com/flame-engine/flame/issues/2771.
Implementation
@visibleForTesting
static void initGameStateListener(
Game currentGame,
void Function() onGameStateChange,
) {
currentGame.addGameStateListener(onGameStateChange);
// See https://github.com/flame-engine/flame/issues/2771
// for why we aren't using [WidgetsBinding.instance.lifecycleState].
currentGame.lifecycleStateChange(AppLifecycleState.resumed);
}