getGameModeById method

Id getGameModeById(
  1. String id
)

Implementation

Id getGameModeById(String id) => gameModes.singleWhere((element) => !isNullOrEmpty(element.id) && element.id! == id);