google_places_autocomplete 1.0.0
google_places_autocomplete: ^1.0.0 copied to clipboard
Seamlessly integrate Google Places API into your Flutter app with this package. Get location autocomplete, detailed place info, and flexible UI implementation.
Changelog #
All notable changes to this project will be documented in this file.
1.0.0 - 2024-12-24 #
🏗 Native SDK Migration #
- Android: Migrated to
PlacesClient(Google Places SDK for Android). - iOS: Migrated to
GMSPlacesClient(Google Places SDK for iOS). - Session Tokens: Implemented strict Session Token management to optimize billing (reduces cost by grouping autocomplete queries).
- API Key Security: Supports restricting API keys to Android apps (SHA-1) and iOS apps (Bundle ID) when using native SDKs.
0.1.1 - 2024-12-24 #
🚀 New Features #
- Distance from User - Predictions now include
distanceMeterswhen you provide user's origin location viaoriginLat/originLngparameters - Platform-Native API Key - Automatically reads API key from:
- Android:
com.google.android.geo.API_KEYinAndroidManifest.xml - iOS:
GOOGLE_PLACES_API_KEYinInfo.plist
- Android:
- Dynamic Origin Update - New
setOrigin()andclearOrigin()methods to update user location after initialization
⚠️ Breaking Changes #
- Listener callback names fixed (typo correction):
predictionsListner→predictionsListenerloadingListner→loadingListener
initialize()is now async - Must useawait initialize()instead of sync callapiKeyis now optional - Package attempts to read from platform config first, falls back to provided key
Migration Guide #
Before (v0.1.0):
final places = GooglePlacesAutocomplete(
apiKey: 'YOUR_KEY', // Required
predictionsListner: (p) => ..., // Typo
loadingListner: (l) => ..., // Typo
);
places.initialize(); // Sync
After (v0.1.1):
final places = GooglePlacesAutocomplete(
// apiKey optional - reads from AndroidManifest/Info.plist
originLat: userLat, // NEW: for distance
originLng: userLng, // NEW: for distance
predictionsListener: (p) => ..., // Fixed spelling
loadingListener: (l) => ..., // Fixed spelling
);
await places.initialize(); // Async!
0.1.0 - 2025-05-29 #
Production Release #
- Fixed cross-platform compatibility issues with Dio HTTP client
- Improved HTTP client security with proper certificate handling
- Enhanced error handling and logging
- Added comprehensive documentation
- Optimized for latest Flutter versions
0.0.6 - 2025-05-28 #
Platform Compatibility #
- Fixed BrowserHttpClientAdapter issue for web platforms
- Updated dependencies for latest Flutter compatibility