getOfflineRegionStatus method

Future<OfflineRegionStatus> getOfflineRegionStatus(
  1. int regionId
)

Reads the download progress of the offline region regionId.

While the download is active, the counts cover what it has visited. Once it's inactive, they cover every resource the region holds, including those that only earlier versions of its style listed, so the completed counts can exceed the required counts.

See mln_runtime_get_offline_region_status in the C API reference.

Errors:

  • Status.notFound when the cache file has no region regionId.

Implementation

Future<OfflineRegionStatus> getOfflineRegionStatus(int regionId) => _query(
  _resultOfflineRegionStatus,
  (arena, completion) => raw.mln_runtime_get_offline_region_status(
    _handle.raw,
    regionId,
    completion,
    nativeDiagnostic,
  ),
);