Skip to content
pubscout

google_cloud_firestore

0.5.5, released 2 months ago by firebase.google.com

A Dart client library for Google Cloud Firestore database.

$ flutter pub add google_cloud_firestore
Source repository

What it does

Provides a complete API for interacting with Google Cloud Firestore, including documents, collections, queries, transactions, batches, and bulk writes. It can be used standalone or with the Firebase Admin SDK.

AI-written summary of version 0.5.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a backend or server application in Dart that needs to interact with Google Cloud Firestore.
  • You are running inside Firebase Functions or using the Firebase Admin SDK and need Firestore access.

Skip it when

  • You are building a mobile client application using standard Firebase mobile SDKs (use cloud_firestore instead).

Strengths

  • Complete API support for documents, collections, queries, transactions, and enterprise pipeline operations.
  • Supports connection pooling via HTTP/2 and integrates with Application Default Credentials or service accounts.

Weaknesses

  • Not intended as a direct drop-in replacement for the mobile client-side cloud_firestore package.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
12

Requires either Application Default Credentials (e.g., via gcloud auth application-default login or environment variables) or a service account JSON file.

import 'package:google_cloud_firestore/google_cloud_firestore.dart';

final firestore = Firestore();
final ref = firestore.collection('users').doc('user-id');
await ref.set({'name': 'John Doe', 'age': 27});

Alternatives

Packages that do the same job and could replace google_cloud_firestore.

  • cloud_firestore

    Choose cloud_firestore if you are building a client mobile/web app using Firebase plugins rather than server-side or Cloud/Admin integration.

Works with

Packages commonly used together with google_cloud_firestore: ones it builds on, ones built on it, and its own family.