operator == method
Allows two instances of MtgCard to be considered equal if the relevant properties are equal.
setName not included because setCode serves the same purpose. manaValue not included in determining equality because manaCost serves the same purpose.
Implementation
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
const deepEquality = DeepCollectionEquality();
return other is MtgCard &&
runtimeType == other.runtimeType &&
deepEquality.equals(cardFaces, other.cardFaces) &&
deepEquality.equals(keywords, other.keywords) &&
language == other.language &&
rarity == other.rarity &&
releasedAt == other.releasedAt &&
reserved == other.reserved &&
setCode == other.setCode &&
artist == other.artist &&
flavorText == other.flavorText &&
deepEquality.equals(images, other.images) &&
manaCost == other.manaCost &&
name == other.name &&
oracleText == other.oracleText &&
power == other.power &&
toughness == other.toughness &&
typeLine == other.typeLine;
}