checkForUpdates method
Retrieves OfflineMapUpdatesInfo
for the offline map that was used to
construct this task.
The returned OfflineMapUpdatesInfo
provides high level information on
what updates are available for this offline map. Information is provided
on:
- Online changes that can be applied to update your offline map
- Local changes from your offline map that can be sent back to the online services
Calling this method provides high-level information on the available updates. It can help you to determine whether to call OfflineMapSyncTask.syncOfflineMap immediately, based upon factors such as current disk space and network availability. Examine these properties before starting the potentially time-consuming offline map sync process.
The resulting OfflineMapUpdatesInfo
provides a snap-shot of available
updates when this method was called. To check for new updates you need to
call this method again.
Return Value: A Future of OfflineMapUpdatesInfo
.
Implementation
Future<OfflineMapUpdatesInfo> checkForUpdates() {
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_OfflineMapSyncTask_checkForUpdatesAsync(
_handle, errorHandler);
});
return taskHandle
.toFuture((element) => element.getValueAsOfflineMapUpdatesInfo()!);
}