solveClosestFacility method
- ClosestFacilityParameters closestFacilityParameters
Solves a closest facility passing in a parameters object.
Executes the ClosestFacilityParameters defined for this ClosestFacilityTask and returns a ClosestFacilityResult containing the results.
Parameters:
closestFacilityParameters
— The closest facility parameters.
Return Value: A Future that returns a ClosestFacilityResult type.
Implementation
Future<ClosestFacilityResult> solveClosestFacility(
ClosestFacilityParameters closestFacilityParameters,
) {
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_ClosestFacilityTask_solveClosestFacilityAsync(
_handle,
closestFacilityParameters._handle,
errorHandler,
);
});
return taskHandle.toFuture(
(element) => element.getValueAsClosestFacilityResult()!,
);
}