validate method
Implementation
@override
void validate(ShapeRegistry shapes) {
final shape = shapes.require(shapeType);
if (editAfterCreation && !shape.textEditable) {
throw ArgumentError('Tool cannot edit text in $shapeType.');
}
if (autoWidthOnClick &&
shape.behavior.textSizing == ShapeTextSizing.fixed) {
throw ArgumentError('Tool cannot auto-size text in $shapeType.');
}
}