RecoverOrDiscardUnsyncedChangesHandler class Sync

A client reset strategy that attempts to automatically recover any unsynchronized changes. If that fails, this handler fallsback to the discard unsynced changes strategy.

If you set RecoverOrDiscardUnsyncedChangesHandler callback as clientResetHandler argument of Configuration.flexibleSync, Realm will compare the local Realm with the Realm on the server and automatically transfer any changes from the local Realm that makes sense to the Realm provided by the server. If that fails, the local changes will be discarded. This is the default mode for fully synchronized Realms.

Inheritance

Constructors

RecoverOrDiscardUnsyncedChangesHandler({BeforeResetCallback? onBeforeReset, AfterResetCallback? onAfterRecovery, AfterResetCallback? onAfterDiscard, ClientResetCallback? onManualResetFallback})
Creates an instance of RecoverOrDiscardUnsyncedChangesHandler.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
onAfterDiscard AfterResetCallback?
The callback that will be executed just after the client reset happens if the local changes needed to be discarded.
no setter
onAfterRecovery AfterResetCallback?
The callback that will be executed just after the client reset happens if the local changes were successfully recovered.
no setter
onBeforeReset BeforeResetCallback?
The callback that will be executed just before the client reset happens.
no setter
onManualReset ClientResetCallback?
The callback that handles the ClientResetError.
finalinherited
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