flutter_google_places_hoc081098 1.0.0-nullsafety.1 copy "flutter_google_places_hoc081098: ^1.0.0-nullsafety.1" to clipboard
flutter_google_places_hoc081098: ^1.0.0-nullsafety.1 copied to clipboard

outdated

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 #

Google places autocomplete widgets for flutter.

Updated by @hoc081098. See file changes #

Pub Hits

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

Simple usage #

// 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.

52
likes
0
pub points
97%
popularity

Publisher

unverified uploader

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

License

unknown (LICENSE)

Dependencies

collection, flutter, google_api_headers, google_maps_webservice, http, listenable_stream, rxdart

More

Packages that depend on flutter_google_places_hoc081098