Last updated:
0 purchases
fire api dart
This is a dart implementation for fire_api
Usage #
To use Firestore, you need to either make sure you are running in a google cloud environment or provide a service account key file.
If you are not running on google and want to easily test ensure the following environment variables are set when running. (in intellij, you can set them in the run configuration)
GCP_PROJECT=<project_id>
GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_key.json>
If you need a custom database name, other than "(default)", or a custom AuthClient you can use the GoogleCloudFirestoreDatabase.create(database: "mydbname", auth: AuthClient) to override.
import 'package:fire_api_dart/fire_api_dart.dart';
void main() async {
// You need to await this because using auth credentials requires async
await GoogleCloudFirestoreDatabase.create();
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.