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
- Host: GitHub
- URL: https://github.com/ewpratten/geoip
- Owner: ewpratten
- License: mit
- Created: 2018-05-04T15:35:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-05T15:37:00.000Z (about 8 years ago)
- Last Synced: 2025-02-10T12:16:19.406Z (over 1 year ago)
- Topics: dart, geolocation, library
- Language: Dart
- Homepage: https://pub.dartlang.org/packages/geoip
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
}
```