ip_to_int 0.0.4 copy "ip_to_int: ^0.0.4" to clipboard
ip_to_int: ^0.0.4 copied to clipboard

outdated

Import IpInt to Dart

ip-to-int #

Build Status codecov

Usage #

Class IpInt #

IpInt("<IP-ADDRESS>")
IpInt("127.0.0.1")

toInt

This method return the String ip address as integer

IpInt("<IP-ADDRESS>").toInt()
int integer = IpInt("127.2.3.1").toInt();
print(integer);

2130838273

toIp

This method return the integer as an String ip address

IpInt("<INTEGER>").toIp()
String ipAddress IpInt("2130706433").toIp()
print(ipAddress)

"127.0.0.1"