bigdatacloud_reverse_geocode_client 1.0.2
bigdatacloud_reverse_geocode_client: ^1.0.2 copied to clipboard
Free reverse geocoding for Flutter/Dart — get city, country, and locality from GPS coordinates with automatic IP geolocation fallback. No API key needed.
import 'package:bigdatacloud_reverse_geocode_client/bigdatacloud_reverse_geocode_client.dart';
void main() async {
// Detect user location: tries GPS first, falls back to IP if denied
try {
final location = await GeoLocation.detect();
print('City: ${location.city}');
print('Country: ${location.countryName}');
print('Source: ${location.lookupSource}');
} catch (e) {
print('Error: $e');
}
// Detect with different language
try {
final location = await GeoLocation.detect(language: 'ja');
print('Country: ${location.countryName}'); // 日本
} catch (e) {
print('Error: $e');
}
}