onSyncComplete method

dynamic onSyncComplete(
  1. String serviceName
)

Implementation

onSyncComplete(String serviceName) async {
  Timer.periodic(const Duration(seconds: 1), (timer) async {
    var value = await watchServiceCompleted(serviceName);
    print("timer" + value.toString());
    if (value.first['CompleteStatus'] == 1) {
      if (onSyncCompleted != null) onSyncCompleted!.call();
      await pdlg!.hide();
      timer.cancel();
    }
  });
}