Ipify class

This queries the ipify service (http://www.ipify.org) to retrieve this machine's public IP address. Returns your public IP address as a string or any error encountered. By default, this function will run using exponential as a json string, and backoff.

Usage:

void main() async {
  final data = await Ipify.ipv4(format: Format.JSON);

  print(data);
}

Constructors

Ipify()

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

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

balance(String api) Future
Get your API current balance
geo(String api, {String? ip}) Future<GeoModel>
Discover the precise physical location of a given IP address, the default geo search is from this device current Public IP address.
ipv4({Format format = Format.TEXT}) Future<String>
Simply returns an IPv4 address, the default format is a text
ipv64({Format format = Format.TEXT}) Future<String>
Simply returns an IPv6 address if existed else fallback for IPv4, the default format is a text