ShapeTool constructor

ShapeTool({
  1. required ShapeToolType shapeType,
})

Create a ShapeTool to draw the specified ShapeToolType.

By default, this tool enables the creation, selection, transformation, and deletion interactions appropriate for creating geometries with a geometric shape. This behavior can be customized with ShapeTool.configuration.

Parameters:

  • shapeType — The type of shape drawn by this tool.

Implementation

factory ShapeTool({
  required ShapeToolType shapeType,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ShapeTool_create(
      shapeType.coreValue,
      errorHandler,
    );
  });
  return ShapeTool._withHandle(handle);
}