DiscardUnsyncedChangesHandler constructor
const
DiscardUnsyncedChangesHandler({
- BeforeResetCallback? onBeforeReset,
- AfterResetCallback? onAfterReset,
- ClientResetCallback? onManualResetFallback,
Creates an instance of DiscardUnsyncedChangesHandler
.
This strategy supplies three callbacks: onBeforeReset
, onAfterReset
and onManualResetFallback
.
The first two are invoked just before and after the client reset has happened,
while the last one will be invoked in case an error occurs during the automated process and the system needs to fallback to a manual mode.
The freshly downloaded copy of the synchronized Realm triggers all change notifications as a write transaction is internally simulated.
Implementation
const DiscardUnsyncedChangesHandler({BeforeResetCallback? onBeforeReset, AfterResetCallback? onAfterReset, ClientResetCallback? onManualResetFallback})
: super._(ClientResyncModeInternal.discardLocal, onManualResetFallback, onAfterDiscard: onAfterReset, onBeforeReset: onBeforeReset);