Card class sealed

A card within the game.

Equality

A card's equality is solely based on its cardSet, orderInSet. However, TokenCards are not equal to non-token cards with the same orderInSet.

Implementers
Available Extensions
Annotations
  • @immutable

Constructors

Card({required CardSet cardSet, required int orderInSet, required String name, required Set<Aspect> aspects, bool unique = 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
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