ip_geolocate 1.1.0 copy "ip_geolocate: ^1.1.0" to clipboard
ip_geolocate: ^1.1.0 copied to clipboard

IPv4 geolocation from the free geolite2-city-json static dataset (MaxMind GeoLite2-City): country, region, city and coordinates for an IP address.

example/example.dart

import 'package:ip_geolocate/ip_geolocate.dart';

Future<void> main() async {
  final loc = await geolocate('8.8.8.8');
  print(loc);
  // -> GeoLocation(country: US, region: null, city: null, lat: 37.751, lon: -97.822, accuracyKm: 1000)

  final gdansk = await geolocate('77.236.25.1');
  print('${gdansk?.city}, ${gdansk?.country}'); // -> Gdansk, PL
}
0
likes
160
points
1.17k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

IPv4 geolocation from the free geolite2-city-json static dataset (MaxMind GeoLite2-City): country, region, city and coordinates for an IP address.

Repository (GitHub)
View/report issues

Topics

#geolocation #geoip #ip #maxmind

License

MIT (license)

Dependencies

http

More

Packages that depend on ip_geolocate