getSyncProgress method

Future<Progress> getSyncProgress()

Returns the synchronization progress of this repository as the number of bytes already synced (Progress.value) vs. the total size of the repository in bytes (Progress.total).

Implementation

Future<Progress> getSyncProgress(
) async {
  final request = RequestRepositoryGetSyncProgress(
    repo: handle,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseProgress(value: final value): return value;
    default: throw UnexpectedResponse();
  }
}