Card.fromInt constructor
Card.fromInt(
- int cardId
Implementation
factory Card.fromInt(int cardId) {
if (cardId >= 52) {
return const Card(value: 0, suit: 0);
}
return Card(value: cardId % 13 + 1, suit: (cardId / 13).floor());
}