Loon class

Properties

broadcastManager BroadcastManager
final
dependencyManager DependencyManager
final
documentStore ValueStore<DocumentSnapshot>
The store of document snapshots indexed by document path.
final
hashCode int
The hash code for this object.
no setterinherited
persistManager PersistManager?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteCollection(Collection collection) → void
deleteDocument<T>(Document<T> doc) → void
existsSnap<T>(Document<T> doc) bool
getSnapshot<T>(Document<T> doc) DocumentSnapshot<T>?
getSnapshots<T>(Collection<T> collection) List<DocumentSnapshot<T>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseSnap<T>(DocumentSnapshot snap, {required FromJson<T>? fromJson, required ToJson<T>? toJson, required PersistorSettings? persistorSettings, required DependenciesBuilder<T>? dependenciesBuilder}) DocumentSnapshot<T>
replaceCollection<T>(Collection<T> collection, List<DocumentSnapshot<T>> snaps) List<DocumentSnapshot<T>>
toString() String
A string representation of this object.
inherited
writeDocument<T>(Document<T> doc, T data, {required BroadcastEvents event, bool broadcast = true, bool persist = true}) DocumentSnapshot<T>

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

logger Logger
final
persistor Persistor?
no setter
persistorSettings PersistorSettings?
no setter

Static Methods

clearAll({bool broadcast = true}) Future<void>
collection<T>(String name, {FromJson<T>? fromJson, ToJson<T>? toJson, PersistorSettings? persistorSettings, DependenciesBuilder<T>? dependenciesBuilder}) Collection<T>
configure({Persistor? persistor, bool enableLogging = false}) → void
doc<T>(String id, {FromJson<T>? fromJson, ToJson<T>? toJson, PersistorSettings? persistorSettings}) Document<T>
hydrate([List<StoreReference>? refs]) Future<void>
Hydrates persisted data from the store using the persistor specified in Loon.configure. If no arguments are provided, then the entire store is hydrated by default. If specific StoreReference documents and collections are provided, then only data in the store under those references are hydrated.
inspect() Json
Returns a Map of all of the data and metadata of the store for debugging and inspection purposes.
rebroadcast(Document doc) → void
Schedules a document to be rebroadcasted, updating all listeners that are subscribed to that document.
unsubscribe() → void
Unsubscribes all active observers of the store, disposing their stream resources.