operator / method

Fraction operator /(
  1. Object other
)

Returns the division of this fraction and other.

Implementation

Fraction operator /(Object other) {
  if (other is Fraction) {
    return Fraction(a * other.b, b * other.a);
  } else if (other is int) {
    return Fraction(a, b * other);
  } else {
    throw ArgumentError.value(other, 'other', 'Invalid type');
  }
}