rarity property

String get rarity

get rarity of item

Implementation

String get rarity {
  switch (rarityEnum) {
    case Rarity.common:
      return "common";
    case Rarity.uncommon:
      return "uncommon";
    case Rarity.rare:
      return "rare";
    case Rarity.epic:
      return "epic";
    case Rarity.legendary:
      return "legendary";
    default:
      return "common";
  }
}