An open API service indexing awesome lists of open source software.

https://github.com/ewpratten/geoip

A wrapper of ip-thingy.com for geolocation via IP addresses in Dart
https://github.com/ewpratten/geoip

dart geolocation library

Last synced: about 1 year ago
JSON representation

A wrapper of ip-thingy.com for geolocation via IP addresses in Dart

Awesome Lists containing this project

README

          

# geoIP
## A wrapper of ip-thingy.com for geolocation via IP addresses in Dart
By: Evan Pratten

# How to use
```Dart
import 'package:geoip/geoip.dart' as geoip;

main() async {
var Data = await geoip.GetData("1.1.1.1");

print(geoip.latlong(Data)[0]); // Print latitude

print(geoip.latlong(Data)[1]); // Print longitude

print(geoip.ipnumber(Data)); // Print ip address number

print(geoip.protoversion(Data)); //Print internet protocall version

print(geoip.region(Data)); // Print region

print(geoip.countrycode(Data)); // Print countrycode

print(geoip.country(Data)); // Print country

print(geoip.city(Data)); // Print city

print(geoip.timezone(Data)); // Print timezone (+10:00)

print(geoip.zipcode(Data)); // Print zipcode
}
```