Card class sealed

A card within the game.

Equality

A card's equality is solely based on its cardSet, orderInSet, isToken.

Implementers
Annotations
  • @immutable

Constructors

Card({required CardSet cardSet, required int orderInSet, required String name, required Set<Aspect> aspects, bool unique = false, bool isToken = false})
Creates a card with the given cardSet, orderInSet, name, aspects.

Properties

aspects Set<Aspect>
Aspects that the card belongs to.
final
cardSet CardSet
The set the card belongs to.
final
hashCode int
The hash code for this object.
no setteroverride
isToken bool
Whether the card is a token upgrade.
final
name String
The name of the card.
final
orderInSet int
Within the set, the card's number from 1 to CardSet.totalCards.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unique bool
Whether the card is unique.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDebugString() String
Returns a string representation of this object, suitable for debugging.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override