operator - method

  1. @override
IPv4Address operator -(
  1. dynamic other
)

Subtraction operator.

Implementation

@override
IPv4Address operator -(dynamic other) {
  if (other is int) {
    return IPv4Address.fromInt((_ip - BigInt.from(other)).toInt());
  } else if (other is BigInt) {
    return IPv4Address.fromInt((_ip - other).toInt());
  } else {
    throw ValueError('Other is int or BigInt only');
  }
}