mergeOfflineRegions method

Future<List<OfflineRegionInfo>> mergeOfflineRegions(
  1. String sideDatabasePath
)

Copies the offline regions of another cache file into the runtime's cache file.

A region whose definition and metadata match one that the runtime's file already has isn't copied again. The result lists the runtime's copy of each region in the other file.

See mln_runtime_merge_offline_regions in the C API reference.

Errors:

  • Status.invalidArgument when sideDatabasePath isn't a readable database file.
  • Status.nativeError when the merge would exceed the tile limit that RuntimeEventType.offlineRegionTileCountLimitExceeded describes.

Implementation

Future<List<OfflineRegionInfo>> mergeOfflineRegions(
  String sideDatabasePath,
) => _queryList(
  _resultOfflineRegionInfo,
  (arena, completion) => raw.mln_runtime_merge_offline_regions(
    _handle.raw,
    nativeStringView(sideDatabasePath, arena).value,
    completion,
    nativeDiagnostic,
  ),
);