SyncRepository class abstract
The repository for work with synchronization.
By default the synchronization is off (see. isEnabled), you should turn it on when log in complete, because if user is not logged in, than it can't sync data.
Constructors
Properties
- currentState → SyncStateInfo
-
Returns the current synchronization state.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isEnabled
→ Future<
bool> -
trueif synchronization is on.no setter - isPaused → bool
-
trueif synchronization is paused.no setter -
lastSyncCompletedDate
→ Future<
DateTime?> -
Returns the date of the last successful synchronization complete
with device time.
no setter
-
lastSyncDate
→ Future<
DateTime?> -
Returns the date of the last synchronization with device time.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ Stream<
SyncStateInfo> -
Returns the synchronization status stream.
no setter
Methods
-
clearAll(
) → Future< void> - Clear all sync data.
-
debugDoNotSendChanges(
) → void - Specifies that modified data should not be sent. As a rule, it is necessary for debugging when authorizing with other people's data.
-
disable(
) → Future< void> - Turn of synchronization.
-
dispose(
) → Future< void> - Used to release the memory allocated to variables when the repository is no longer in use.
-
enable(
int userId, {bool waitForSync = false}) → Future< void> - Turn on synchronization.
-
hasUnsyncedChanges(
) → Future< bool> - Checks whether all local data and associated files are fully synchronized with the remote.
-
needSynchronize(
) → void - Mark that synchronization needs to be performed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> - Pauses synchronization.
-
resume(
) → Future< void> - Resumes paused synchronization.
-
synchronize(
{bool manual = false}) → Future< void> - Make synchronization with remote.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited