InternetAddress.fromRawAddress constructor

InternetAddress.fromRawAddress(
  1. Uint8List rawAddress, {
  2. @Since("2.8") InternetAddressType? type,
})

Creates a new InternetAddress from the provided raw address bytes.

If the type is InternetAddressType.IPv4, the rawAddress must have length 4. If the type is InternetAddressType.IPv6, the rawAddress must have length 16. If the type is InternetAddressType.unix, the rawAddress must be a valid UTF-8 encoded file path.

If type is omitted, the rawAddress must have a length of either 4 or 16, in which case the type defaults to InternetAddressType.IPv4 or InternetAddressType.IPv6 respectively.

Implementation

external factory InternetAddress.fromRawAddress(Uint8List rawAddress,
    {@Since("2.8") InternetAddressType? type});