operator == method

  1. @override
bool operator ==(
  1. Object other
)
override

Allows two instances of MtgCardFace to be considered equal if the relevant properties are equal.

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 MtgCardFace &&
      runtimeType == other.runtimeType &&
      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;
}