MyModelFirestoreRepository class

Inheritance

Properties

collectionPath String
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serializer FirestoreSerializer<MyModel>
no setteroverride

Methods

createDocument(MyModel data) Future<String>
Adds object to collection with random id by firebase returns the id of the created object throws Exception if there was an error.
inherited
deleteDocument(String id) Future
throws Exception if there was an error.
inherited
getCollectionRef() → CollectionReference<MyModel>
inherited
getDocRef(String id) → DocumentReference<MyModel>
inherited
listenToAll({bool includeMetadataChanges = false}) Stream<Resource<List<MyModel>>>
streams Failure if there was an error. streams NoDataFailure if no documents exist
inherited
listenToDocument(String id, {bool includeMetadataChanges = false}) Stream<Resource<MyModel>>
streams Failure if there was an error. streams NoDataFailure if document does not exist
inherited
listenToDocumentWithMetadata(String id, {bool includeMetadataChanges = false}) Stream<Resource<TSnapshot<MyModel>>>
streams Failure if there was an error. streams NoDataFailure if document does not exist
inherited
listenToQuery(QueryApplier<MyModel> applyQuery, {bool includeMetadataChanges = false}) Stream<Resource<List<MyModel>>>
streams Failure if there was an error. streams NoDataFailure if no documents exist
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(QueryApplier<MyModel> applyQuery) Future<Resource<List<MyModel>>>
inherited
readAll() Future<Resource<List<MyModel>>>
returns Failure if there was an error. returns NoDataFailure if documents do not exist
inherited
readDocument(String id) Future<Resource<MyModel>>
returns Failure if there was an error. returns NoDataFailure if document does not exist
inherited
readDocumentWithMetadata(String id) Future<Resource<TSnapshot<MyModel>>>
returns Failure if there was an error. returns NoDataFailure if document does not exist
inherited
toString() String
A string representation of this object.
inherited
updateDocument(MyModel data) Future
throws Exception if there was an error.
inherited
updateDocumentFields(String id, Map<String, dynamic> fields) Future
throws Exception if there was an error.
inherited
updateDocumentFieldsFromObject(MyModel data) Future
throws Exception if there was an error.
inherited

Operators

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