getOrCreatePlayer method Null safety

WrappedPlayer getOrCreatePlayer(
  1. String playerId
)

Implementation

WrappedPlayer getOrCreatePlayer(String playerId) {
  return players.putIfAbsent(playerId, () => WrappedPlayer());
}