IPv4Address.fromInt constructor

IPv4Address.fromInt(
  1. int addr
)

Crates a new IPv4Address from integer.

Implementation

IPv4Address.fromInt(int addr) {
  // ignore: unnecessary_null_comparison
  if (addr == null) {
    throw AddressValueError('Address cannot be empty');
  }
  _checkIntAddress(addr);
  _ip = BigInt.from(addr);
}