FirestoreService<T extends Modelable> class final

Service for managing a FirestoreCollection repository.

Inheritance

Constructors

FirestoreService(String repositoryId, T fromModelFactory(Model), {dynamic onDocUpdate(Model, bool)?})

Properties

fromModelFactory ↔ T Function(Model)
Factory to create an instance of T from a Model.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
repository Repository
Data repository.
latefinalinherited
repositoryId String
Id of the repository.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear({String? userId}) Future<void>
Performs repository.clear().
inherited
count({String? userId, Where? where}) Future<int>
Performs repository.count().
inherited
create(T item, {String? wantedId}) Future<String>
Creates a new entry in the repository. Returns the id of the new entry.
inherited
delete(T item) Future<void>
Performs repository.delete().
inherited
deleteWhere(Where where) Future<void>
Performs repository.deleteWhere().
inherited
get(String id) Future<T>
Performs repository.get().
inherited
getAll({String? userId, Where? where, String? orderBy, bool descending = true}) Future<List<T>>
Performs repository.getAll().
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(T item) Future<void>
Performs repository.update().
inherited

Operators

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