operator == method

  1. @override
bool operator ==(
  1. covariant Currency other
)
override

Two currencies are considered equivalent if the isoCode and decimalDigits are the same.

Are we breaking the semantics of the == operator? Maybe we need another method that just compares the isoCode?

Implementation

@override
bool operator ==(covariant Currency other) =>
    identical(this, other) ||
    (isoCode == other.isoCode && decimalDigits == other.decimalDigits);