FieldValue class

Represents sentinel values that can be used when writing document fields.

Use static methods to create instances for operations like arrayUnion, delete, etc.

Properties

hashCode → int
The hash code for this object.
no setterinherited
operation → String
Gets the operation type of this FieldValue.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → dynamic
Gets the value associated with this FieldValue.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns a string representation of this FieldValue.
override

Operators

operator ==(Object other) → bool
Checks equality with another FieldValue.
override

Static Methods

arrayRemove(List elements) → FieldValue
Creates a FieldValue for removing elements from an array.
arrayUnion(List elements) → FieldValue
Creates a FieldValue for adding elements to an array (union).
delete() → FieldValue
Creates a FieldValue for deleting a field.
deleteVector() → FieldValue
Creates a FieldValue for deleting an embedding entry from $embeddings.
denseVector(List values) → Map<String, dynamic>
Creates a dense vector payload for embedding fields.
increment(num value) → FieldValue
Creates a FieldValue for incrementing a numeric field.
serverTimestamp() → FieldValue
Creates a FieldValue for setting a server timestamp.
sparseVector(int dimension, List indices, List values) → Map<String, dynamic>
Creates a sparse vector payload for embedding fields.