IPv4Address class
A class for representing and manipulating single IPv4 Addresses.
Constructors
- IPv4Address(String addr)
- Creates a new IPv4Address.
- IPv4Address.fromInt(int addr)
- Crates a new IPv4Address from integer.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxPrefixlen → int
-
The total number of bits in the address representation for this version: 32 for IPv4, 128 for IPv6.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → int
-
The appropriate version number: 4 for IPv4, 6 for IPv6.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBigInt(
) → BigInt -
Returns an bigint representation of an IP address.
inherited
-
toInt(
) → int -
Returns an integer representation of an IP address.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
dynamic other) → IPv4Address - Addition operator.
-
operator -(
dynamic other) → IPv4Address - Subtraction operator.
-
operator <(
dynamic other) → bool -
inherited
-
operator <=(
dynamic other) → bool -
inherited
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
dynamic other) → bool -
inherited
-
operator >=(
dynamic other) → bool -
inherited
Static Methods
-
tryParse(
String addr) → IPv4Address? - Create a new IPv4Address. Like constructor except that this function returns null.
-
tryParseFromInt(
int addr) → IPv4Address? - Create a new IPv4Address from integer. Like constructor except that this function returns null.