FieldValue class abstract

Sentinel values that can be used when writing document fields with set() or update().

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

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

Operators

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

Static Methods

arrayRemove(List elements) FieldValue
Returns a special value that tells the server to remove the given elements from any array value that already exists on the server.
arrayUnion(List elements) FieldValue
Returns a special value that tells the server to union the given elements with any array value that already exists on the server.
delete() FieldValue
Returns a sentinel for use with update() to mark a field for deletion.
increment(num n) FieldValue
Returns a special value that can be used with set() or update() that tells the server to increment the field's current value by the given value. If either the operand or the current field value uses floating point precision, all arithmetic follows IEEE 754 semantics. If both values are integers, values outside of JavaScript's safe number range (Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER) are also subject to precision loss. Furthermore, once processed by the Firestore backend, all integer operations are capped between -2^63 and 2^63-1. If the current field value is not of type number, or if the field does not yet exist, the transformation sets the field to the given value.
serverTimestamp() FieldValue
Returns a sentinel used with set() or update() to include a server-generated timestamp in the written data.