UpgradeCard.token constructor

UpgradeCard.token({
  1. required CardSet cardSet,
  2. required int orderInSet,
  3. required String name,
  4. required Set<Trait> traits,
  5. int bonusPower = 0,
  6. int bonusHp = 0,
})

Creates an upgrade token card with the given properties.

Errors

This class is not intended to be used with user-provided input, and as such does not provide any error handling. If any of the fields are invalid, an error will be thrown.

See also isToken, which has different validation rules for some fields.

Implementation

UpgradeCard.token({
  required super.cardSet,
  required super.orderInSet,
  required super.name,
  required super.traits,
  this.bonusPower = 0,
  this.bonusHp = 0,
}) : super(aspects: const {}, cost: 0, unique: false, isToken: true);