Pakete, Repositories und App-Kategorien suchen

Paketdetailsv0.4.3

flutter_google_places_sdk

Ein Flutter-Plugin für die Google Places SDK, das auf jeder Plattform native Bibliotheken verwendet

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
24.900
Likes
110
Pub-Punkte
140

Paket installieren

flutter pub add flutter_google_places_sdk

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Ein Flutter-Plugin, das die nativen Google Places SDKs für Android, iOS, Web, macOS, Windows und Linux integriert. Es ermöglicht Entwicklern, Ortsuche, Autovervollständigung und Adressenauswahl mithilfe plattformspezifischer Native-Bibliotheken mit optimaler Leistung und Konsistenz zu implementieren. Das Paket vereinfacht den Zugriff auf Googles Geolocation-Dienste innerhalb von Flutter-Anwendungen und sorgt für eine nahtlose Benutzererfahrung auf allen unterstützten Plattformen.

Anwendungsfälle

  • Suche mit Autovervollständigung
  • Adressenauswahl in Formularen
  • Standortbasierte App-Funktionen
  • Kartenintegration mit Ortsdaten
  • Entdeckung der Benutzerposition
  • Verbesserungen für Reise- und Lieferungs-App

Hauptmerkmale

  • Verwendet native Google Places SDKs
  • Plattformübergreifende Kompatibilität
  • Echtzeit-Vorschläge für Orte
  • Unterstützt mehrere Plattformen (Android, iOS, Web, macOS, Windows, Linux)
  • Leichtgewichtig und effizient
  • Einfache Integration in bestehende Flutter-Projekte

Geeignet für

  • Entwickler, die ortsbasierte Apps erstellen
  • Apps, die eine genaue Adresseneingabe erfordern
  • Reise-, Lebensmittelzustell- oder Fahrgemeinschafts-Plattformen
  • Projekte, die Leistungsstärke auf niedriger Ebene benötigen
  • Teams, die ein konsistentes Verhalten des Ortsauswahl-Widgets über Plattformen hinweg wünschen

Hinweise

  • Erfordert die Konfiguration eines Google-API-Schlüssels
  • Abhängig von Google Play Services (Android)
  • Kann aufgrund der Google Cloud-Rechnungsstellung Nutzungsgrenzen haben
  • Die Web-Version erfordert zusätzliche Einrichtung
  • iOS erfordert eine korrekte Info.plist-Konfiguration
  • Mögliche Latenz während des initialen Ladens des Ortes

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

flutter_google_places_sdk

pub package

Tests

A Flutter plugin for google places sdk that uses the native libraries on each platform. Check out Rational below to understand why you should use this plugin.

Usage

To use this plugin, add flutter_google_places_sdk as a dependency in your pubspec.yaml file.

Web Usage

When using the web support you also need to enable the Maps JavaScript API in google cloud:

https://developers.google.com/maps/documentation/javascript/get-api-key

Limits:

  • Location restriction is not supported. See google issue tracker for more info: https://issuetracker.google.com/issues/36219203

Rational

By now you probably found some other plugins, and wondering why this one was even created. Well, there's a good reason for that.

All other plugins will use http web requests rather than the native sdk.

Google allows you to limit the usage of your api key to your android application. However, that only works when you're using the native SDK.

So when using the http web requests method, you can't actually limit it, and if someone can get your API key (usually not a problem if it's in a mobile client), it can be used anywhere outside of it.

Example

import 'package:flutter/material.dart';
import 'package:flutter_google_places_sdk/flutter_google_places_sdk.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: () async {
            final places = FlutterGooglePlacesSdk('my-key');
            final predictions =
                await places.findAutocompletePredictions('Tel Aviv');
            print('Result: $predictions');
          },
          child: Text('Predict and print to console'),
        ),
      ),
    ),
  ));
}

Development & Contributing

This is a side project of mine, hence issues are usually dealt with on weekends.

PRs are more than welcome if anyone want to contribute. There are

Contribution Guidelines
  1. General code quality will adhere to new PRs, although nothing too strict. Specifics will discussed in each PRs.
  2. This is a multi-platform plugin, and each package is maintained independently. As part of it, each commit that changes the version is also tagged per platform. The result is that changes that require multiple packages will require multiple commits - and hence multiple PRs.

Kategorien

Abhängigkeiten

Abhängigkeiten 7 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.