InternetAddress constructor

InternetAddress(
  1. String address,
  2. {@Since("2.8") InternetAddressType? type}
)

Creates a new InternetAddress from a numeric address or a file path.

If type is InternetAddressType.IPv4, address must be a numeric IPv4 address (dotted-decimal notation). If type is InternetAddressType.IPv6, address must be a numeric IPv6 address (hexadecimal notation). If type is InternetAddressType.unix, address must be a a valid file path. If type is omitted, address must be either a numeric IPv4 or IPv6 address and the type is inferred from the format.

Implementation

external factory InternetAddress(String address,
    {@Since("2.8") InternetAddressType? type});

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-io/InternetAddress/InternetAddress.html