fromJson static method

AchievementType fromJson(
  1. String json
)

Implementation

static AchievementType fromJson(String json) {
  switch (json) {
    case "daily":
      return AchievementType.daily;
    case "weekly":
      return AchievementType.weekly;
    case "monthly":
      return AchievementType.monthly;
    case "one-time":
      return AchievementType.one_time;
    default:
      throw ArgumentError("Unknown type: $json");
  }
}