sync method
- @Deprecated("Only init should be called.")
- AtSyncUIOverlay atSyncUIOverlay = AtSyncUIOverlay.none,
- bool startTimer = true,
calls sync and shows selected UI
atSyncUIOverlay
decides whether dialog or snackbar to be shown while syncing
Implementation
@Deprecated("Only init should be called.")
void sync({
AtSyncUIOverlay atSyncUIOverlay = AtSyncUIOverlay.none,
bool startTimer = true,
}) {
cancelTimer();
this.atSyncUIOverlay = this.atSyncUIOverlay == AtSyncUIOverlay.none
? atSyncUIOverlay
: this.atSyncUIOverlay;
/// change status to syncing
_atSyncUIListenerSink.add(AtSyncUIStatus.syncing);
if (startTimer) {
_removeAtsignTimer = Timer(Duration(seconds: _removeAtsignSeconds), () {
_hide();
cancelTimer();
_show(
atSyncUIOverlay: atSyncUIOverlay,
showRemoveAtsignOption: true,
);
});
}
/// show showRemoveAtsignOption if we are not starting a timer
_show(
atSyncUIOverlay: atSyncUIOverlay,
showRemoveAtsignOption: !startTimer,
);
}