saveDocumentWithConflictHandler abstract method
FutureOr<bool>
saveDocumentWithConflictHandler(
- MutableDocument document,
- SaveConflictHandler conflictHandler
Saves a document
to this collection, resolving conflicts with a
conflictHandler
.
When write operations are executed concurrently and if conflicts occur,
the conflictHandler
will be called. Use the conflict handler to directly
edit the Document to resolve the conflict. When the conflict handler
returns true
, the save method will save the edited document as the
resolved document. If the conflict handler returns false
, the save
operation will be canceled with false
as the result. If the conflict
handler returns true
or there is no conflict the result is true
.
Implementation
FutureOr<bool> saveDocumentWithConflictHandler(
MutableDocument document,
SaveConflictHandler conflictHandler,
);