cards library
Defines the schema for the cards.
NOTE: It's recommended to import this library with a prefix, e.g.:
// It's recommended to import the library with a prefix.
import 'package:unlimited/cards.dart' as cards;
import 'package:unlimited/schema.dart';
void main() {
final vader = cards.sparkOfRebellion.find(10);
// Pattern match to get the card's type.
switch (vader) {
case final BaseCard card:
print('Base: ${card.name}: ${card.location}');
case final UnitCard card:
print('Unit: ${card.name}: ${card.title ?? '<No title>'}');
case final EventCard card:
print('Event: ${card.name}');
case final UpgradeCard card:
print('Upgrade: ${card.name}');
}
}
Classes
- CardSetInventory
- A collection of cards that belongs to a specific CardSet.
Properties
- sparkOfRebellion → CardSetInventory
-
The Spark of Rebellion card set, as previewed so far by September 1, 2023.
final