geocodeCancelable method
- {required String searchText,
- GeocodeParameters? parameters}
Cancelable version of geocode. See that method for more information.
Implementation
CancelableOperation<List<GeocodeResult>> geocodeCancelable(
{required String searchText, GeocodeParameters? parameters}) {
final coreSearchText = _CString(searchText);
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_LocatorTask_geocodeWithParameters(
_handle,
coreSearchText.bytes,
parameters?._handle ?? ffi.nullptr,
errorHandler);
});
return taskHandle
.toCancelableOperation((element) => element.getValueAsList()!);
}