Coder Social home page Coder Social logo

samuelmtdavies / flutter_google_places_hoc081098 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hoc081098/flutter_google_places_hoc081098

0.0 1.0 0.0 14.05 MB

Better flutter_google_places, updated by @hoc081098

Home Page: https://pub.dev/packages/flutter_google_places_hoc081098

License: Other

Ruby 2.64% Objective-C 0.07% Kotlin 0.23% Dart 93.33% Swift 0.79% HTML 2.93%

flutter_google_places_hoc081098's Introduction

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)

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.