MtgSet class
A Set object represents a group of related Magic cards. All Card objects on Scryfall belong to exactly one set.
Due to Magic’s long and complicated history, Scryfall
includes many un-official sets as a way to group promotional
or outlier cards together. Such sets will likely have a code
that begins with p
or t
, such as pcel
or tori
.
Official sets always have a three-letter set code, such as zen
.
- Annotations
-
- @JsonSerializable()
Constructors
- MtgSet({required String id, required String code, String? mtgoCode, String? arenaCode, int? tcgplayerId, required String name, required SetType setType, DateTime? releasedAt, String? blockCode, String? block, String? parentSetCode, required int cardCount, int? printedSize, required bool digital, required bool foilOnly, required bool nonfoilOnly, required Uri scryfallUri, required Uri uri, required Uri iconSvgUri, required Uri searchUri})
-
Constructs a MtgSet by setting its properties.
const
-
MtgSet.fromJson(Map<
String, dynamic> json) -
Constructs a MtgSet from JSON.
factory
Properties
- arenaCode → String?
-
The unique code for this set on Arena, which may differ from
the regular code.
final
- block → String?
-
The block or group name code for this set, if any.
final
- blockCode → String?
-
The block code for this set, if any.
final
- cardCount → int
-
The number of cards in this set.
final
- code → String
-
The unique three to five-letter code for this set.
final
- digital → bool
-
True if this set was only released in a video game.
final
- foilOnly → bool
-
True if this set contains only foil cards.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconSvgUri → Uri
-
A URI to an SVG file for this set’s icon on Scryfall’s CDN.
Hotlinking this image isn’t recommended, because it may change
slightly over time. You should download it and use it locally
for your particular user interface needs.
final
- id → String
-
A unique ID for this set on Scryfall that will not change.
final
- mtgoCode → String?
-
The unique code for this set on MTGO, which may differ from
the regular code.
final
- name → String
-
The English name of the set.
final
- nonfoilOnly → bool
-
True if this set contains only nonfoil cards.
final
- parentSetCode → String?
-
The set code for the parent set, if any.
promo
andtoken
sets often have a parent set.final - printedSize → int?
-
The denominator for the set’s printed collector numbers.
final
- releasedAt → DateTime?
-
The date the set was released or the first card was printed
in the set (in GMT-8 Pacific time).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scryfallUri → Uri
-
A link to this set’s permapage on Scryfall’s website.
final
- searchUri → Uri
-
A Scryfall API URI that you can request to begin paginating
over the cards in this set.
final
- setType → SetType
-
A computer-readable classification for this set.
final
- tcgplayerId → int?
-
This set’s ID on TCGplayer’s API,
also known as the groupId.
final
- uri → Uri
-
A link to this set object on Scryfall’s API.
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