Reach enum

Describes how far reads/writes should reach before they are good enough.

The possible values are:

  • Reach.local - The local cache. You get the best resiliency (and best reading/writing latency), but risk of inconsistent state is high.
  • Reach.server - The fastest (cloud) database or search engine. Often diverges from the regional master database. For example, it's usual for search engine clusters to take seconds or minutes before they have indexed changes in the regional master.
  • Reach.regional - The regional master. May diverge from the global master database during (extremely rare) network partitions.
  • - The global master. You get the worst resiliency and best possible consistency.


final snapshot = await document.get(reach: Reach.local);


global → const Reach

Global master database.

const Reach(3)
local → const Reach

Local cache.

const Reach(0)
regional → const Reach

Regional master database.

const Reach(2)
server → const Reach

The fastest cloud database or search engine.

const Reach(1)
values → const List<Reach>

A constant List of the values in this enum, in order of their declaration.

const List<Reach>


hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]