fromCompatibleFormat static method

EndgameInfo fromCompatibleFormat(
  1. String csv
)

Implementation

static EndgameInfo fromCompatibleFormat(String csv) {
  final Map<String, dynamic> data =
      jsonDecode(csv) as Map<String, dynamic>;
  return EndgameInfo(
      harmonyAttempted: data["hmnyAttempt"],
      matchResult: MatchResult.values[data["res"]],
      endState: EndStatus.values[data["end"]],
      harmony: Harmony.values[data["hmny"]],
      trapScored: TrapScored.values[data["trap"]],
      micScored: MicScored.values[data["mic"]]);
}