toFirestore abstract method
Called by the SDK to convert value into the map that is written.
options are the SetOptions of the write, or null (for example for
add).
The map can hold any value Firestore stores, including FieldValue sentinels. With a merge option you can return only the fields to merge.
Implementation
Map<String, Object?> toFirestore(T value, SetOptions? options);