flutter_google_places_hoc081098 2.0.0 copy "flutter_google_places_hoc081098: ^2.0.0" to clipboard
flutter_google_places_hoc081098: ^2.0.0 copied to clipboard

PlatformAndroid

Google places autocomplete widgets for flutter. No wrapper, use https://pub.dartlang.org/packages/google_maps_webservice. Better flutter_google_places, updated by @hoc081098

flutter_google_places_hoc081098 #

All Contributors

Google places autocomplete widgets for flutter.

Updated by @hoc081098. See files changed #

Pub Hits Build example

Liked some of my work? Buy me a coffee (or more likely a beer). Thanks for your support ❤️

Buy Me A Coffee

  • Migrated to null-safety.
  • Updated dependencies to latest release.
  • Refactoring by using RxDart for more power.
  • Fixed many issues.
  • Applied flutter_lints.
  • Refactored example, migrated to Android v2 embedding.
dependencies:
  flutter:
    sdk: flutter
  flutter_google_places_hoc081098: <last-version>

Simple usage #

According to https://stackoverflow.com/a/52545293, you need to enable billing on your account, even if you are only using the free quota.

// replace flutter_google_places by flutter_google_places_hoc081098
import 'package:flutter_google_places_hoc081098/flutter_google_places_hoc081098.dart';

const kGoogleApiKey = 'API_KEY';

void onError(PlacesAutocompleteResponse response) {
  ScaffoldMessenger.of(context).showSnackBar(
    SnackBar(
      content: Text(response.errorMessage ?? 'Unknown error'),
    ),
  );
}

final Prediction? p = await PlacesAutocomplete.show(
  context: context,
  apiKey: kGoogleApiKey,
  onError: onError,
  mode: Mode.overlay, // or Mode.fullscreen
  language: 'fr',
  components: [Component(Component.country, 'fr')],
);

The library use google_maps_webservice library which directly refer to the official documentation for google maps web service.

Contributors ✨ #

Thanks goes to these wonderful people (emoji key):


Petrus Nguyễn Thái Học

💻 🚧

Corentin Giraud

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

56
likes
140
points
7.16k
downloads

Publisher

unverified uploader

Weekly Downloads

Google places autocomplete widgets for flutter. No wrapper, use https://pub.dartlang.org/packages/google_maps_webservice. Better flutter_google_places, updated by @hoc081098

Repository (GitHub)
View/report issues

Topics

#rxdart #hoc081098 #google-places #google-places-autocomplete #flutter-google-places

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

unknown (license)

Dependencies

collection, flutter, flutter_bloc_pattern, google_api_headers, http, json_annotation, listenable_stream, meta, rxdart, rxdart_ext

More

Packages that depend on flutter_google_places_hoc081098