MTGSymbol class

Represents a single Magic: The Gathering symbol.

See toSvg for a visual representation of this symbol.

Constructors

MTGSymbol.new({required String english, required String image, String? looseVariant, double? manaValue})
Creates a new MTGSymbol instance. looseVariant and manaValue are optional because not all MTGSymbol instances have them.
const

Properties

english String
An English snippet that describes this symbol. Appropriate for use in alt text or other accessible communication formats.
final
hashCode int
Necessary for == to work properly.
no setteroverride
image String
The path to the SVG asset that represents this symbol.
final
looseVariant String?
An alternate version of this symbol, if it is possible to write it without curly braces.
final
manaValue double?
The mana value of this symbol, if any. This is a double because some "Un" set symbols have fractional mana values.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toSvg({double height = 16.0}) → SvgPicture
Returns a visual representation of the MTGSymbol as an SvgPicture.

Operators

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

Static Properties

regex RegExp
A regular expression used to find MTG symbol syntax in a String, where that is defined as a left curly brace, followed by any number of the accepted characters, followed by a right curly brace.
no setter