BackgroundSyncManager class
Background sync manager for handling platform-specific background tasks.
This class integrates with WorkManager on Android and BGTaskScheduler on iOS to enable background synchronization when the app is not active.
This implements the cross-isolate communication and background task scheduling from the technical specification.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReadyForBackgroundSync → bool
-
Checks if SynquillStorage is properly initialized
for background operations.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelBackgroundSync(
) → Future< void> - Cancels all background sync tasks.
-
enableBackgroundMode(
) → void - Switches the retry executor to background mode for battery optimization.
-
enableForegroundMode(
{bool forceSync = false}) → void - Switches the retry executor to foreground mode for active use.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processBackgroundSyncTasks(
{bool forceSync = false}) → Future< void> - Processes sync tasks in the background isolate.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → BackgroundSyncManager
-
Gets the singleton instance
no setter
Static Methods
-
initialize(
) → Future< void> - Initializes the background sync system.
-
reset(
) → Future< void> - Resets the background sync manager.