SyncDirectionResolver typedef

SyncDirectionResolver = SyncDirection? Function(int pendingCount, SyncDirection defaultDirection)

A callback that allows customizing the sync direction based on pending operations.

This callback is invoked before each sync operation to determine the optimal sync direction. It receives the current pending operation count and the default sync direction, and can return a custom direction.

Returns the sync direction to use for the operation. If null is returned, the default direction will be used.

Implementation

typedef SyncDirectionResolver = SyncDirection? Function(int pendingCount, SyncDirection defaultDirection);