flutter_google_places_sdk_macos
The macos implementation of Flutter plugin for google places sdk
Flutter plugin for google places native sdk
English project snapshot. Visit GitHub for the latest content.
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.
To use this plugin, add flutter_google_places_sdk as a dependency in your pubspec.yaml file.
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:
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.
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'),
),
),
),
));
}
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
The macos implementation of Flutter plugin for google places sdk
The windows implementation of Flutter plugin for google places sdk
Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗