FLUTTER ECOSYSTEM

hoc081098/flutter_google_places_hoc081098

더 나은 flutter_google_places, @hoc081098에 의해 업데이트됨

flutter_google_places_hoc081098 프로젝트 이미지
Stars
20
Forks
49
최근 푸시(UTC)
2024. 6. 21.
프로젝트 상태
활성
Petrus Nguyễn Thái Học GitHub avatar
GITHUB User

Petrus Nguyễn Thái Học ↗

Functional & Reactive Programming - Rx Fan 🌰 RxDart - RxKotlin - RxSwift - rxjs 🌸 Android - iOS - Flutter - Node.js - Angular

@Kotlin-Android-Open-Source @Flutter-Dart-Open-SourceDa Nang, Vietnam공식 웹사이트 ↗
언어DartHTMLRubySwiftKotlinObjective-C

기술 주제

사용 중인 의존성

의존성 목록 14 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

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 :heart:

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>
https://raw.githubusercontent.com/hoc081098/flutter_google_places/master/flutter_01.png https://raw.githubusercontent.com/hoc081098/flutter_google_places/master/flutter_02.png

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):

https://avatars.githubusercontent.com/u/36917223?v=4?s=100
Petrus Nguyễn Thái Học

💻 🚧
https://avatars.githubusercontent.com/u/29222996?v=4?s=100
Corentin Giraud

💻

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