validate method

void validate(
  1. ShapeBehavior behavior
)

Implementation

void validate(ShapeBehavior behavior) {
  if ((sizingMode == DiagramTextSizingMode.autoWidth ||
          clickSizingMode == DiagramTextSizingMode.autoWidth) &&
      behavior.textSizing == ShapeTextSizing.fixed) {
    throw ArgumentError('Auto-width creation requires growing text.');
  }
}