Document<T> class

Implemented types

Constructors

Document({String? id, String? documentPath, String? collectionPath, DocumentSnapshot<Map<String, dynamic>>? snapshot, Map<String, dynamic>? values, CollectionReference<Map<String, dynamic>>? collectionRef})

Properties

collectionPath String
no setter
collectionRef CollectionReference<Map<String, dynamic>>
no setter
collectionRootReference CollectionReference<Map<String, dynamic>>
no setter
createdAt Timestamp?
no setter
createdFieldValueKey String
no setter
documentPath String
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
no setter
modelName String
For reference
no setter
reference DocumentReference<Map<String, dynamic>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot DocumentSnapshot<Map<String, dynamic>>?
For constructor
final
updatedAt Timestamp?
no setter
updatedFieldValueKey String
no setter
values Map<String, dynamic>?
final

Methods

fromData(Map<String, dynamic> data) → void
Data for load
isVal(Map<String, dynamic> data, String key) bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCompleted(ExecuteType executeType) → void
Completed of create and update and delete.
setAt({Timestamp? createdAt, Timestamp? updatedAt}) → void
setSnapshot(DocumentSnapshot<Map<String, dynamic>> snap) → void
Set snapshot and documentId.
storageFile(Map<String, dynamic> data, String folderName) StorageFile?
inherited
storageFiles(Map<String, dynamic> data, String folderName) List<StorageFile>?
inherited
timestampFromMap(dynamic data, String key) Timestamp?
inherited
toData() Map<String, dynamic>
Data for save
toString() String
A string representation of this object.
inherited
valueFromIncrement<U extends num>(Map<String, dynamic> data, String key) Increment<U>
inherited
valueFromKey<U>(Map<String, dynamic> data, String key, {required U defaultValue}) → U
inherited
valueListFromKey<U>(Map<String, dynamic> data, String key) List<U>?
inherited
valueMapFromKey<U, V>(Map<String, dynamic> data, String key) Map<U, V>?
inherited
valueMapListFromKey<U, V>(Map<String, dynamic> data, String key) List<Map<U, V>>?
inherited
write(Map<String, dynamic> data, String key, dynamic value) → void
inherited
writeIncrement(Map<String, dynamic> data, Increment<num> entity, String fieldName) → void
inherited
writeModel(Map<String, dynamic> data, String key, Model model) → void
inherited
writeModelList(Map<String, dynamic> data, String key, List<Model> models) → void
inherited
writeModelListNotNull(Map<String, dynamic> data, String key, List<Model> models) → void
inherited
writeModelNotNull(Map<String, dynamic> data, String key, Model model) → void
inherited
writeNotNull(Map<String, dynamic> data, String key, dynamic value) → void
inherited
writeStorage(Map<String, dynamic> data, String key, StorageFile storageFile, {bool isSetNull = true}) → void
inherited
writeStorageList(Map<String, dynamic> data, String key, List<StorageFile> storageFiles, {bool isSetNull = true}) → void
inherited
writeStorageListNotNull(Map<String, dynamic> data, String key, List<StorageFile> storageFiles, {bool isSetNull = true}) → void
inherited
writeStorageNotNull(Map<String, dynamic> data, String key, StorageFile storageFile, {bool isSetNull = false}) → void
inherited

Operators

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

Static Methods

path<T extends Document<DocumentType>>({String? id, String? collectionPath}) String