operator > method

bool operator >(
  1. Money other
)

Returns true when this money is greater than other.

Both operands have to be in same currency, ArgumentError will be thrown otherwise.

Implementation

bool operator >(Money other) {
  _preconditionThatCurrencyTheSameFor(
      other, () => 'Cannot compare money in different currencies.');

  return amount > other.amount;
}