google_search_place 0.0.4 copy "google_search_place: ^0.0.4" to clipboard
google_search_place: ^0.0.4 copied to clipboard

Custom Google search places autocomplete widget for all platform. Use https://pub.dev/packages/google_search_place

google_search_place #

Pub Dev

Custom Google search places autocomplete widget for all platform.

Get started #

Add dependency #

You can use the command to add google_search_place as a dependency with the latest stable version:

$ dart pub add google_search_place

Or you can manually add google_search_place into the dependencies section in your pubspec.yaml:

dependencies:
  google_search_place: ^replace-with-latest-version

The latest version is: Pub The latest version including pre-releases is: Pub

Before you upgrade: Breaking changes might happen in major and minor versions of packages.
See the [Migration Guide][] for the complete breaking changes list.

Super simple to use #

import 'package:google_search_place/google_search_place.dart';

final TextEditingController _searchPlaceController = TextEditingController();
 SearchPlaceAutoCompletedTextField(
  googleAPIKey: "",
  controller: _searchPlaceController,
  itmOnTap: (Prediction prediction) {
    _searchPlaceController.text = prediction.description ?? "";

    _searchPlaceController.selection = TextSelection.fromPosition(TextPosition(offset: prediction.description?.length ?? 0));
  },
  getPlaceDetailWithLatLng: (Prediction prediction) {
    _searchPlaceController.text = prediction.description ?? "";

    _searchPlaceController.selection = TextSelection.fromPosition(TextPosition(offset: prediction.description?.length ?? 0));

    debugPrint("${prediction.lat} ${prediction.lng}");
  }
)
    

Customization Option #

You can customize a text field input decoration and debounce time

3
likes
130
pub points
64%
popularity

Publisher

unverified uploader

Custom Google search places autocomplete widget for all platform. Use https://pub.dev/packages/google_search_place

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, rxdart

More

Packages that depend on google_search_place