IPv4Address constructor

IPv4Address(
  1. String addr
)

Creates a new IPv4Address.

Implementation

IPv4Address(String addr) {
  // ignore: unnecessary_null_comparison
  if (addr == null) {
    throw AddressValueError('Address cannot be empty');
  }
  if (addr.contains('/')) {
    throw AddressValueError('Unexpected \'/\' in $addr');
  }
  _ip = BigInt.from(_ipIntFromString(addr));
}