operator + method

SqlMoney operator +(
  1. Object other
)

Implementation

SqlMoney operator +(Object other) {
  if (other is SqlMoney) {
    return SqlMoney(value + other.value);
  } else if (other is num) {
    return SqlMoney(value + other);
  } else if (other is String) {
    return SqlMoney(value + double.parse(other.toString()));
  }
  throw ArgumentError(other.toString() + 'is not a number');
}