IPAddress class

Constructors

IPAddress(String address, {InternetAddressType type = InternetAddressType.IPv4})
Create a new IPAddress instance with the given address. The IP address is validated on construction and will throw an exception on an invalid address.
factory

Properties

address String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type InternetAddressType
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromHost(String host, {InternetAddressType type = InternetAddressType.IPv4, InternetAddress hostPredicate(List<InternetAddress>)?}) Future<IPAddress>
Build an IPAddress instance from the host's IP address of type.
validate(String? address, {InternetAddressType type = InternetAddressType.IPv4}) → ({Object? error, bool state})
Validate that an IP address is correctly formatted by attempting to parse the IP address utilizing the built-in URI parser.