FireDoc class

Constructors

FireDoc(DocumentReference<Map<String, dynamic>> reference)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addToList<T>(String key, T value) Future<void>
checkFieldExists(String field) Future<bool>
convert<T>(T convertor(Map<String, dynamic>)) Future<T?>
convert map to data that you want, you can use freeze like: childrenResult.convert(YouDataset.fromJson)
convertForce<T>(T convertor(Map<String, dynamic>)) Future<T>
convertStream<T>(T convertor(Map<String, dynamic>)) Stream<T?>
convert stream version.
convertStreamForce<T>(T convertor(Map<String, dynamic>)) Stream<T>
delete() Future<void>
get() Future<Map<String, dynamic>?>
getCheckbox(String key) Widget
get a checkbox widget the data of key must be bool
getColl(String name) FireColl
Coll is a collection in firestore Coll just can include documents
getDocFromField(String field) Future<FireDoc?>
getID() String
getIncludeIDMap() Future<Map<String, dynamic>?>
this Get will include id in the map.
getMapRef() Object
use this to add a reference to a field like ...set({'rr':fireDoc.getMapRef()})
getValue(String key) Future<Object?>
!!! Be careful !!!
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readStream() Stream<Map<String, dynamic>?>
TODO: research this function when doc not exists? when doc exists? when doc exists but no data? when doc delete?
set(Map<String, dynamic> data) Future<void>
toString() String
A string representation of this object.
override
update(Map<String, dynamic> data) Future<String>
Updates data on the document. Data will be merged with any existing document data.

Operators

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

Static Methods

castMap(Map<String, dynamic>? map) Map<String, dynamic>?