MtgCard class

MtgCard objects represent individual Magic: The Gathering cards that players could obtain and add to their collection (with a few minor exceptions).

Cards are the API’s most complex object. You are encouraged to thoroughly read this document and also the article about layouts and images.

Card Names

Internally, Scryfall tracks the uniqueness of “Oracle names.” (i.e. names you can pick when an effect asks you to “choose a card name”). Each unique Oracle name is separately available in the card names catalog.

Note that while most Oracle card names are unique, Scryfall also indexes other objects such as tokens and Unstable set variants which do not always have a unique name.

Multiface Cards

Magic cards can have multiple faces or multiple cards printed on one card stock. The faces could be shown divided on the front of the card as in split cards and flip cards, or the card can be double-faced as in transform cards and modal DFCs.

Scryfall represents multi-face cards as a single object with a card_faces array describing the distinct faces.

Annotations
  • @JsonSerializable()

Constructors

MtgCard({int? arenaId, required String id, required Language lang, int? mtgoId, int? mtgoFoilId, List<int>? multiverseIds, int? tcgplayerId, int? tcgplyerEtchedId, int? cardmarketId, required String oracleId, required Uri printsSearchUri, required Uri rulingsUri, required Uri scryfallUri, required Uri uri, List<RelatedCard>? allParts, List<CardFace>? cardFaces, required double cmc, required List<Color> colorIdentity, List<Color>? colorIndicator, List<Color>? colors, int? edhrecRank, String? handModifier, required List<String> keywords, required Layout layout, required Legalities legalities, String? lifeModifier, String? loyalty, String? manaCost, required String name, String? oracleText, required bool oversized, String? power, List<Color>? producedMana, required bool reserved, String? toughness, required String typeLine, String? artist, List<String>? artistIds, required bool booster, required BorderColor borderColor, required String? cardBackId, required String collectorNumber, required bool? contentWarning, required bool digital, required bool foil, required bool nonfoil, required List<Finish> finishes, String? flavorName, String? flavorText, List<FrameEffect>? frameEffects, required Frame frame, required bool fullArt, required List<Game> games, required bool highresImage, String? illustrationId, required ImageStatus imageStatus, ImageUris? imageUris, required Prices prices, String? printedName, String? printedText, String? printedTypeLine, required bool promo, List<String>? promoType, required Map<String, Uri>? purchaseUris, required Rarity rarity, required Map<String, Uri> relatedUris, required DateTime releasedAt, required bool reprint, required Uri scryfallSetUri, required String setName, required Uri setSearchUri, required SetType setType, required Uri setUri, required String set, required String setId, required bool storySpotlight, required bool textless, required bool variation, String? variationOf, SecurityStamp? securityStamp, String? watermark, Preview? preview})
Constructs a MtgCard by settings its properties.
const
MtgCard.fromJson(Map<String, dynamic> json)
Constructs a MtgCard from JSON.
factory

Properties

allParts List<RelatedCard>?
If this card is closely related to other cards, this property will be a List with RelatedCard Objects.
final
arenaId int?
This card’s Arena ID, if any.
final
artist String?
The name of the illustrator of this card.
final
artistIds List<String>?
The unique identifiers of the illustrators of this card.
final
booster bool
Whether this card is found in boosters.
final
borderColor BorderColor
This card’s border color.
final
cardBackId String?
The Scryfall ID for the card back design present on this card, if any.
final
cardFaces List<CardFace>?
A List of CardFace objects, if this card is multifaced.
final
cardmarketId int?
This card’s ID on Cardmarket’s API, also known as the idProduct.
final
cmc double
The card’s converted mana cost. Note that some funny cards have fractional mana costs.
final
collectorNumber String
This card’s collector number.
final
colorIdentity List<Color>
This card’s color identity.
final
colorIndicator List<Color>?
The colors in this card’s color indicator, if any.
final
colors List<Color>?
This card’s colors, if the overall card has colors defined by the rules.
final
contentWarning bool?
True if you should consider avoiding use of this print downstream.
final
digital bool
True if this card was only released in a video game.
final
edhrecRank int?
This card’s overall rank/popularity on EDHREC.
final
finishes List<Finish>
An array of computer-readable flags that indicate in which finishes this card can come in.
final
flavorName String?
The just-for-fun name printed on the card (such as for Godzilla series cards).
final
flavorText String?
The flavor text, if any.
final
foil bool
True if the card exists in foil.
final
frame Frame
This card’s Frame layout.
final
frameEffects List<FrameEffect>?
This card’s FrameEffects, if any.
final
fullArt bool
True if this card’s artwork is larger than normal.
final
games List<Game>
A List of Games that this card print is available in
final
handModifier String?
This card’s hand modifier, if it is Vanguard card.
final
hashCode int
The hash code for this object.
no setterinherited
highresImage bool
True if this card’s imagery is high resolution.
final
id String
A unique ID for this card in Scryfall’s database.
final
illustrationId String?
A unique identifier for the card artwork that remains consistent across reprints.
final
imageStatus ImageStatus
A computer-readable indicator for the state of this card’s image.
final
imageUris ImageUris?
An object listing available imagery for this card
final
keywords List<String>
A List of keywords that this card uses, such as 'Flying' and 'Cumulative upkeep'.
final
lang Language
A language code for this printing.
final
layout Layout
A code for this card’s Layout.
final
legalities Legalities
An object describing the legality of this card across play formats.
final
lifeModifier String?
This card’s life modifier, if it is Vanguard card.
final
loyalty String?
This loyalty if any.
final
manaCost String?
The mana cost for this card.
final
mtgoFoilId int?
This card’s foil Magic Online ID (also known as the Catalog ID), if any.
final
mtgoId int?
This card’s Magic Online ID (also known as the Catalog ID), if any.
final
multiverseIds List<int>?
This card’s multiverse IDs on Gatherer, if any, as an array of integers.
final
name String
The name of this card.
final
nonfoil bool
True if the card exists in non-foil.
final
oracleId String
A unique ID for this card’s oracle identity.
final
oracleText String?
The Oracle text for this card, if any.
final
oversized bool
True if this card is oversized.
final
power String?
This card’s power, if any.
final
preview Preview?
Information about when and where the card was first previewed, if any.
final
prices Prices
An object containing daily price information for this card.
final
printedName String?
The localized name printed on this card, if any.
final
printedText String?
The localized text printed on this card, if any.
final
printedTypeLine String?
The localized type line printed on this card, if any.
final
printsSearchUri Uri
A link to where you can begin paginating all re/prints for this card on Scryfall’s API.
final
producedMana List<Color>?
Colors of mana that this card could produce.
final
promo bool
True if this card is a promotional print.
final
promoType List<String>?
An array of strings describing what categories of promo cards this card falls into.
final
purchaseUris Map<String, Uri>?
An object providing URIs to this card’s listing on major marketplaces.
final
rarity Rarity
This card’s rarity.
final
relatedUris Map<String, Uri>
An object providing URIs to this card’s listing on other Magic: The Gathering online resources.
final
releasedAt DateTime
The date this card was first released.
final
reprint bool
True if this card is a reprint.
final
reserved bool
True if this card is on the Reserved List.
final
rulingsUri Uri
A link to this card’s rulings list on Scryfall’s API.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scryfallSetUri Uri
A link to this card’s set on Scryfall’s website.
final
scryfallUri Uri
A link to this card’s permapage on Scryfall’s website.
final
securityStamp SecurityStamp?
The security stamp on this card, if any.
final
set String
This card’s set code.
final
setId String
This card’s Set object UUID.
final
setName String
This card’s full set name.
final
setSearchUri Uri
A link to where you can begin paginating this card’s set on the Scryfall API.
final
setType SetType
The type of set this printing is in.
final
setUri Uri
A link to this card’s MtgSet object on Scryfall’s API.
final
storySpotlight bool
True if this card is a Story Spotlight.
final
tcgplayerId int?
This card’s ID on TCGplayer’s API, also known as the productId.
final
tcgplyerEtchedId int?
This card’s ID on TCGplayer’s API, for its etched version if that version is a separate product.
final
textless bool
True if the card is printed without text.
final
toughness String?
This card’s toughness, if any.
final
typeLine String
The type line of this card.
final
uri Uri
A link to this card object on Scryfall’s API.
final
variation bool
Whether this card is a variation of another printing.
final
variationOf String?
The printing ID of the printing this card is a variation of.
final
watermark String?
This card’s watermark, if any.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited