ShapeParts class abstract final

Reusable composition building blocks shared by domain shape libraries.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

compartments(List<String> rows, {String slotPrefix = 'section', DiagramColor headerFill = const DiagramColor(0xFFEAF1FF), DiagramColor bodyFill = const DiagramColor(0xFFFFFFFF), double padding = 8}) → ShapePart
Stacked, square-cornered compartments with one text slot each, '$slotPrefix-0', '$slotPrefix-1'... The first row is a single-line header filled with headerFill.
headerBand(String slotId, {String text = '', double extent = 40, DiagramColor fill = const DiagramColor(0xFFEAF1FF), DiagramColor? stroke, ShapePart? child}) → ShapePart
A fixed-height, square-cornered band with a single-line slotId title, or a custom child instead of the title.
labeled(String text, {String slotId = 'label', double padding = 16, ParagraphAlignment alignment = ParagraphAlignment.center}) → ShapePart
One padded, editable text slot filling its region.
taggedHeader({String title = '', DiagramColor fill = const DiagramColor(0xFFF4F5F7), DiagramColor? stroke, double strokeWidth = 0}) → ShapePart
A square-cornered header as tall as its single-line title slot, with an optional pill-shaped tag slot before the title that shows only while it has text. Its surface is title-background and the pill's tag-background.

Constants

body → const ShapePart
The default body: one editable body text slot inset by 12.
spacer → const ShapePart
A region that paints nothing and only occupies space.