Instant Sync and Document State in Flutter

Over the course of its lifetime, any Instant document will go through several states. PSPDFKit Instant for Flutter provides a number of callbacks from the Instant document state, outlined below:

  • onSyncStarted — Triggered when a sync operation starts. This can be a sync initiated by the user or a sync triggered automatically by the Instant document.

  • onSyncFinished — Triggered when a sync operation completes successfully.

  • instantSyncFailed — Triggered when a sync operation fails. It includes an error message explaining the cause of the failure.

  • instantAuthenticationFinished — Triggered when the user successfully completes the authentication process for the Instant document.

  • instantAuthenticationFailed — Triggered when the user fails to authenticate for the Instant document. It includes an error message explaining the cause of the failure.

  • instantDownloadFinished (iOS only) — Triggered when a download operation for the Instant document completes successfully.

  • instantDownloadFailed (iOS only) — Triggered when a download operation for the Instant document fails. It includes an error message explaining the cause of the failure.

For detailed guides about the Instant document state, refer to the Android and iOS guides.