minimumSizeFor method

DiagramSize minimumSizeFor(
  1. ShapeElement shape,
  2. Map<String, double> textHeights
)

Implementation

DiagramSize minimumSizeFor(
  ShapeElement shape,
  Map<String, double> textHeights,
) {
  final body = this.body;
  if (body == null || body is ShapeText) return minimumSize;
  final dynamic = body.minimumSizeFor(shape, textHeights);
  return DiagramSize(
    math.max(minimumSize.width, dynamic.width),
    math.max(minimumSize.height, dynamic.height),
  );
}