headerBand static method

ShapePart headerBand(
  1. String slotId, {
  2. String text = '',
  3. double extent = 40,
  4. DiagramColor fill = const DiagramColor(0xFFEAF1FF),
  5. DiagramColor? stroke,
  6. ShapePart? child,
})

A fixed-height, square-cornered band with a single-line slotId title, or a custom child instead of the title.

Implementation

static ShapePart headerBand(
  String slotId, {
  String text = '',
  double extent = 40,
  DiagramColor fill = const DiagramColor(0xFFEAF1FF),
  DiagramColor? stroke,
  ShapePart? child,
}) => ShapeSized(
  extent: extent,
  child: ShapeSurface(
    style: ShapeStyle(
      fill: fill,
      stroke: stroke ?? const ShapeStyle().stroke,
      cornerRadius: 0,
      strokeWidth: 1,
    ),
    child:
        child ??
        ShapeText(
          slotId,
          text: text,
          textType: PlainTextDefinition(maxLines: 1),
        ),
  ),
);