FieldValue class

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

This class serves as a static factory for FieldValuePlatform instances, but also as a facade for the FieldValue type, so plugin users don't need to worry about the actual internal implementation of their FieldValues after they're created.

Annotations

Properties

hashCode int
The hash code for this object.
no setteroverride
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.
override

Operators

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

Static Methods

arrayRemove(List elements) FieldValue
Returns a FieldValue 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 FieldValue 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 value) FieldValue
Returns a special value for use with set() or update() that tells the server to increment the field’s current value by the given value.
serverTimestamp() FieldValue
Returns a sentinel for use with set() or update() to include a server-generated timestamp in the written data.