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