IpAddress class

Constructors

IpAddress()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAllData({Ip version = Ip.v4}) → Future<Map<String, dynamic>>
Gets all data for the current device's public IP Address.
getAllDataFor(String ip) → Future<Map<String, dynamic>>
Fetches data for the given ip address.
getAsn() → Future<int>
Retrieves the ASN by parsing the integer value obtained from the 'asn' key of the 'seeIp' response.
getAsnFor(String ip) → Future<int>
Asynchronously retrieves the Autonomous System Number (ASN) for the given IP address.
getCity() → Future<String>
A function that asynchronously retrieves the city from the getSeeIp method and returns it as a String.
getCityFor(String ip) → Future<String>
A function that retrieves the city information for a given IP address.
getContinentCode() → Future<String>
Retrieves the continent code using the getSeeIp function and returns it as a String.
getContinentCodeFor(String ip) → Future<String>
A function that retrieves the continent code for a given IP address.
getCountry() → Future<String>
Retrieves the country information using the getSeeIp function and returns it as a Future<String>.
getCountryCode() → Future<String>
Retrieves the country code using the getSeeIp function and returns it as a string.
getCountryCode3() → Future<String>
Retrieves the country code in ISO 3166-1 alpha-3 format.
getCountryCode3For(String ip) → Future<String>
Retrieves the country code in ISO 3166-1 alpha-3 format for a given IP address. .
getCountryCodeFor(String ip) → Future<String>
Get the country code for the given IP address.
getCountryFor(String ip) → Future<String>
Retrieves the country for the given IP address.
getIp({Ip version = Ip.v4}) → Future<String>
A function that retrieves the IP address from 'https://ip{version}.seeip.org' using HTTP GET request. It takes an optional parameter 'version' of type 'Ip' which defaults to 'Ip.v4'. Returns a Future<String> containing the retrieved IP address or an error message.
getIpv4() → Future<String>
Retrieves the IPv4 address using the getIp function and returns it as a string.
getIpv6() → Future<String>
A function that returns an IPv6 address by calling the getIp function with the version parameter set to Ip.v6.
getLatitude() → Future<double>
A function that asynchronously retrieves latitude information and returns it as a double.
getLatitudeFor(String ip) → Future<double>
getLongitude() → Future<double>
Retrieves the longitude by parsing the result of the 'getSeeIp' function as a double value.
getLongitudeFor(String ip) → Future<double>
Retrieves the longitude for the given IP address by calling getSeeIpFor function asynchronously.
getOffset() → Future<int>
A function that returns the offset as an integer after parsing the result of the 'getSeeIp' function.
getOffsetFor(String ip) → Future<int>
Get the offset for a given IP by parsing the result of fetching the 'offset' information for that IP.
getOrganization() → Future<String>
Retrieves the organization information using the getSeeIp function and returns it as a string.
getOrganizationFor(String ip) → Future<String>
Retrieves the organization for the given IP address.
getPostalCode() → Future<String>
Get the postal code by calling the getSeeIp function with the 'postal_code' parameter.
getPostalCodeFor(String ip) → Future<String>
Retrieves the postal code for the given IP address.
getRegion() → Future<String>
getRegionCode() → Future<String>
Retrieves the region code using the getSeeIp function and returns it as a String.
getRegionCodeFor(String ip) → Future<String>
A function that retrieves the region code for a given IP address.
getRegionFor(String ip) → Future<String>
Get the region for the given IP address.
getSeeIp(String key) → Future<String>
A function that makes a GET request to 'https://api.seeip.org/geoip/' to retrieve JSON data and returns a specific value based on the provided key. If the key is not found or an exception occurs, appropriate messages are returned.
getSeeIpFor({required String key, required String ip}) → Future<String>
A function that retrieves specific information for a given IP address from the SeeIP API. Takes in 'key' as the information to retrieve and 'ip' as the IP address to query. Returns a Future<String> with the requested information or an error message.
getTimeZone() → Future<String>
Get the time zone using the getSeeIp method and return it as a string.
getTimeZoneFor(String ip) → Future<String>
Retrieves the time zone for the given IP address.
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