strictEquals method

bool strictEquals(
  1. Decimal other
)

Strict equality check (including scale)

  • returns false if other is a Rational
  • returns true only if both value and scale are equal
  • returns false otherwise

Implementation

bool strictEquals(Decimal other) {
  if (other is Rational) return false;
  return _value == other._value && _scale == other._scale;
}