ShapeTool class final

Allows you to create polygon or polyline geometries with a geometric shape by using a single drag interaction.

Create a new shape tool using ShapeTool.new and specify the type of shape to be created

You can select different GeometryEditorElement objects by tapping, move selected elements, and use transformation control handles to rotate and scale the selected elements, subject to the current ShapeTool.configuration.

You can also use this tool to add new geometric shaped parts to existing polygon or polyline geometries by setting InteractionConfiguration.allowPartCreation to true in the ShapeTool.configuration and calling GeometryEditor.startWithGeometry. You cannot use ShapeTool to create geometry types other than GeometryType.polygon or GeometryType.polyline.

By default, this tool does not display vertices or mid-vertices because you do not interact with individual vertices using this tool. The appearance can be customized by changing GeometryEditorTool.style. By default, this tool enables creation, selection, transformation, and deletion. This behavior can be customized with ShapeTool.configuration.

Inheritance

Constructors

ShapeTool({required ShapeToolType shapeType})
Create a ShapeTool to draw the specified ShapeToolType.
factory

Properties

configuration InteractionConfiguration
Defines the set of interactive operations enabled when using this tool.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapeType ShapeToolType
The type of geometric shape drawn by this tool, set at instantiation using ShapeTool.new.
no setter
style GeometryEditorStyle
Defines the visual appearance of GeometryEditor geometries when this tool is in use.
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited