setTeam method

void setTeam(
  1. String player,
  2. String team
)

Set the team of player.

Implementation

void setTeam(String player, String team) {
  removeFromTeam(player);

  _teamByPlayer[player] = team;
  _playersByTeam.putIfAbsent(team, () => <String>[]).add(player);
}