PlayingCard class
Represents a single playing card with a rank and suit.
Example:
final card = PlayingCard(rank: Rank.ace, suit: Suit.spades);
print(card); // A♠
Constructors
- PlayingCard({required Rank rank, required Suit suit})
-
Creates a PlayingCard with the given
rankandsuit.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the short display string, e.g. "A♠", "10♥".
override
Operators
-
operator ==(
Object other) → bool -
Returns true if this card has the same rank and suit as
other.override