getMode method

GameMode? getMode(
  1. String id
)

Implementation

GameMode? getMode(String id) {
  try {
    final data = getAsset('$kPackModesPath/$id.json');
    if (data == null) return null;
    final content = utf8.decode(data);
    return GameModeMapper.fromJson(content);
  } catch (_) {
    return null;
  }
}