https://github.com/cscoderr/google_api_headers_3.2.0
https://github.com/cscoderr/google_api_headers_3.2.0
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cscoderr/google_api_headers_3.2.0
- Owner: cscoderr
- License: mit
- Created: 2025-05-05T09:16:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-26T08:29:08.000Z (about 1 year ago)
- Last Synced: 2025-07-03T12:43:45.771Z (about 1 year ago)
- Language: Dart
- Size: 154 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Google API Headers
A Flutter plugin for getting the headers required to call Google APIs with an [app restricted API key](https://developers.google.com/maps/api-security-best-practices#restricting-api-keys).
[](https://pub.dartlang.org/packages/google_api_headers)
[](https://pub.dev/documentation/google_api_headers/latest/)
[](https://github.com/zeshuaro/google_api_headers/blob/main/LICENSE)
[](https://github.com/zeshuaro/google_api_headers/actions?query=workflow%3A%22GitHub+Actions%22)
[](https://codecov.io/gh/zeshuaro/google_api_headers)
[](https://pub.dev/packages/flutter_lints)
## Getting Started
Add this to your project's `pubspec.yaml` file:
```yml
dependencies:
google_api_headers: ^3.2.0
```
## Usage
Depending on the platform (iOS or Android), the function will return the required key and value pairs for calling Google APIs with keys that are restricted to an iOS or Android app.
```dart
import 'package:google_api_headers/google_api_headers.dart';
final headers = await GoogleApiHeaders().getHeaders();
```