wrapper around https://ipgeolocation.io/ api to get the geolocation with an http request. useful for when permissions are not granted.
features
- uses https://ipgeolocation.io/ as underlying api
getting started
- sign up at https://ipgeolocation.io/ and get api key
- use this library with the api key you just received
usage
import 'package:ip_geolocation_io/ip_geolocation_io.dart';
void main(list<string> arguments) async {
if (arguments.isempty) {
throw 'you must give your api key as first argument, get one at https://app.ipgeolocation.io/';
}
final apikey = arguments.first;
final geolocation = ipgeolocationservice(apikey);
final response = await geolocation.getuserlocation();
print(response);
}
Comments are closed.