solveClosestFacilityCancelable method

CancelableOperation<ClosestFacilityResult> solveClosestFacilityCancelable(
  1. {required ClosestFacilityParameters closestFacilityParameters}
)

Cancelable version of solveClosestFacility. See that method for more information.

Implementation

CancelableOperation<ClosestFacilityResult> solveClosestFacilityCancelable(
    {required ClosestFacilityParameters closestFacilityParameters}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ClosestFacilityTask_solveClosestFacilityAsync(
        _handle, closestFacilityParameters._handle, errorHandler);
  });
  return taskHandle.toCancelableOperation(
      (element) => element.getValueAsClosestFacilityResult()!);
}