toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'level'] = this.level;
  if (this.weaponSlot != null) {
    json[r'weapon_slot'] = this.weaponSlot;
  } else {
    json[r'weapon_slot'] = null;
  }
  if (this.runeSlot != null) {
    json[r'rune_slot'] = this.runeSlot;
  } else {
    json[r'rune_slot'] = null;
  }
  if (this.shieldSlot != null) {
    json[r'shield_slot'] = this.shieldSlot;
  } else {
    json[r'shield_slot'] = null;
  }
  if (this.helmetSlot != null) {
    json[r'helmet_slot'] = this.helmetSlot;
  } else {
    json[r'helmet_slot'] = null;
  }
  if (this.bodyArmorSlot != null) {
    json[r'body_armor_slot'] = this.bodyArmorSlot;
  } else {
    json[r'body_armor_slot'] = null;
  }
  if (this.legArmorSlot != null) {
    json[r'leg_armor_slot'] = this.legArmorSlot;
  } else {
    json[r'leg_armor_slot'] = null;
  }
  if (this.bootsSlot != null) {
    json[r'boots_slot'] = this.bootsSlot;
  } else {
    json[r'boots_slot'] = null;
  }
  if (this.ring1Slot != null) {
    json[r'ring1_slot'] = this.ring1Slot;
  } else {
    json[r'ring1_slot'] = null;
  }
  if (this.ring2Slot != null) {
    json[r'ring2_slot'] = this.ring2Slot;
  } else {
    json[r'ring2_slot'] = null;
  }
  if (this.amuletSlot != null) {
    json[r'amulet_slot'] = this.amuletSlot;
  } else {
    json[r'amulet_slot'] = null;
  }
  if (this.artifact1Slot != null) {
    json[r'artifact1_slot'] = this.artifact1Slot;
  } else {
    json[r'artifact1_slot'] = null;
  }
  if (this.artifact2Slot != null) {
    json[r'artifact2_slot'] = this.artifact2Slot;
  } else {
    json[r'artifact2_slot'] = null;
  }
  if (this.artifact3Slot != null) {
    json[r'artifact3_slot'] = this.artifact3Slot;
  } else {
    json[r'artifact3_slot'] = null;
  }
  if (this.utility1Slot != null) {
    json[r'utility1_slot'] = this.utility1Slot;
  } else {
    json[r'utility1_slot'] = null;
  }
  json[r'utility1_slot_quantity'] = this.utility1SlotQuantity;
  if (this.utility2Slot != null) {
    json[r'utility2_slot'] = this.utility2Slot;
  } else {
    json[r'utility2_slot'] = null;
  }
  json[r'utility2_slot_quantity'] = this.utility2SlotQuantity;
  return json;
}