MtgCardFace class

Represents a single face of a Magic: The Gathering card. Most cards have a single face, but some have multiple faces such as Delver of Secrets.

Implementers

Constructors

MtgCardFace.fromMap(Map m)
Convert a map to an MtgCardFace instance. The intended use case is to store or request JSON data and convert that to a Dart Map, then pass that to this constructor.

Properties

artist String?
The name of the illustrator of this card face, such as 'Raymond Swanland'.
final
flavorText String?
The flavor text printed on this face, if any.
final
hashCode int
Necessary for == to work properly.
no setteroverride
images Map<String, String>?
A Map of image URLs for this face.
final
manaCost String?
The mana cost for this face. This value should be any empty String '' if the cost is absent. Remember that per the game rules, a missing mana cost and a mana cost of {0} are different values.
final
manaValue double?
The mana value of this particular face. This is a double because some "Un" set cards have fractional mana values.
final
name String
The name of this face, such as 'Spawnsire of Ulamog'.
final
oracleText String?
The Oracle text for this face, if any.
final
power String?
This face's power, if any. This is a String because some cards have powers that are not numeric, such as '*'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toughness String?
This face's toughness, if any. This is a String because some cards have toughnesses that are not numeric, such as '*'.
final
typeLine String
The type line of this particular face, such as 'Legendary Artifact'.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preparedManaCost({EdgeInsets? padding = const EdgeInsets.symmetric(horizontal: 1.5)}) List<Widget>?
Returns a visual representation of the manaCost using SVGs for valid MTG symbols. Returns null if manaCost is null or it doesn't contain any valid MTG symbols.
preparedOracleText() TextSpan?
Returns a visual representation of the oracleText using SVGs for valid MTG symbols. Returns null if oracleText is null.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
Allows two instances of MtgCardFace to be considered equal if the relevant properties are equal.
override