CardSet class final

A collection of cards released together, i.e. sparkOfRebellion.

NOTE: This enum-like class is unstable and may change between package versions without a breaking change version bump. To persist, store abbreviation instead and use CardSet.parse or CardSet.tryParse to retrieve the class value.

Annotations
  • @immutable

Constructors

CardSet(String name, {required int totalCards, String? abbreviation, int totalTokens = 0})
Creates a card set with the given name and abbreviation.
factory
CardSet.parse(String abbreviation)
Given an abbreviation, returns the corresponding CardSet value.
factory

Properties

abbreviation → String
The abbreviated name of the card set, in US English and all caps.
final
fullName → String
The full name of the card set, in US English.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalCards → int
The total number of cards in this set, which is always >= 1.
final
totalTokens → int
The total number of token cards in this set, which is always >= 0.
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

Static Properties

sparkOfRebellion → CardSet
Spark of Rebellion (SOR).
final
values → Set<CardSet>
All sets of cards present in this package.
final

Static Methods

tryParse(String abbreviation) → CardSet?
Given an abbreviation, returns the corresponding CardSet value.