createSwatchWithGeometryCancelable method
Cancelable version of createSwatchWithGeometry. See that method for more information.
Implementation
CancelableOperation<ArcGISImage> createSwatchWithGeometryCancelable(
{required double screenScale,
required Size size,
required Geometry geometry,
Color backgroundColor = Colors.transparent}) {
final coreBackgroundColor = backgroundColor.toArcGIS();
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_Symbol_createSwatchWithGeometryCombined(
_handle,
screenScale,
size,
geometry._handle,
coreBackgroundColor._handle,
errorHandler);
});
return taskHandle
.toCancelableOperation((element) => element.getValueAsArcGISImage()!);
}