dart_ipify 1.0.1 copy "dart_ipify: ^1.0.1" to clipboard
dart_ipify: ^1.0.1 copied to clipboard

outdated

This package uses the remote IPify web service in order to get the public IP address.

Dart Ipify #

An unofficial client library for Ipify <https://www.ipify.org/> A Simple Public IP Address API.

About ipify #

Using ipify is ridiculously simple. You have three options. You can get your public IP directly (in plain text), you can get your public IP in JSON format, or you can get your public IP information in JSONP format (useful for Javascript developers).

Meta #

  • Author: Khalil Mejdi
  • Email: khalil.mejdi
  • Status: maintained, active

Purpose #

This library makes getting your public IP address from dart languages extremely simple using Ipify's API.

Installation #

dependencies:
  dart_ipify: ^1.0.0

Usage #

Using this library is very simple. Here's a simple example:

import 'package:dart_ipify/dart_ipify.dart';

void main() async {
  final ipv4 = await Ipify.ipv4();
  print(ipv4); // 98.207.254.136

  final ipv6 = await Ipify.ipv64();
  print(ipv6); // 98.207.254.136 or 2a00:1450:400f:80d::200e

  final ipv4json = await Ipify.ipv64(format: Format.JSON);
  print(ipv4json); //{"ip":"98.207.254.136"} or {"ip":"2a00:1450:400f:80d::200e"}

  // The response type can be text, json or jsonp
}

Change Log #

All library changes, in descending order.

Version 1.0.0

Release Oct 22, 2020

  • First release
152
likes
0
pub points
98%
popularity

Publisher

unverified uploader

This package uses the remote IPify web service in order to get the public IP address.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http

More

Packages that depend on dart_ipify