count method
Returns the number of copies of card
in this collection.
This is an alias for operator[]
.
Implementation
@useResult
int count(Card card) {
final cardSet = _cards[card.cardSet];
if (cardSet == null) {
return 0;
}
return cardSet[card] ?? 0;
}