fromCompatibleFormat static method

PrelimInfo fromCompatibleFormat(
  1. String rawData
)

Implementation

static PrelimInfo fromCompatibleFormat(String rawData) {
  final Map<String, dynamic> data =
      jsonDecode(rawData) as Map<String, dynamic>;
  return PrelimInfo(
      timeStamp: data["time"],
      teamNumber: data["team#"],
      matchNumber: data["match#"],
      scouter: data["scouter"],
      matchType: MatchType.values[data["match"]],
      alliance: TeamAlliance.values[data["allies"]],
      startingPosition:
          MatchStartingPosition.values[data["start"]]);
}