MetagameConfig.fromJson constructor

MetagameConfig.fromJson(
  1. Map json_
)

Implementation

MetagameConfig.fromJson(core.Map json_)
    : this(
        currentVersion: json_.containsKey('currentVersion')
            ? json_['currentVersion'] as core.int
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        playerLevels: json_.containsKey('playerLevels')
            ? (json_['playerLevels'] as core.List)
                .map((value) => PlayerLevel.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );