SequenceDiagramModel class
A TUI bubble that renders a Mermaid sequence diagram.
Example
final diagram = SequenceDiagramModel(
mermaid: '''
sequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Hello
B-->>A: Hi back!
''',
width: 80,
);
print(diagram.view());
- Inheritance
-
- Object
- Model
- ViewComponent
- SequenceDiagramModel
Constructors
- SequenceDiagramModel({String mermaid = '', int width = 80, int height = 24, SequenceDiagramTheme? theme})
Properties
- diagram → SequenceDiagram?
-
Parsed diagram (computed from mermaid).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
Render height in cells.
final
- isValid → bool
-
Whether the diagram parsed successfully.
no setter
- mermaid → String
-
Mermaid sequence diagram source text.
final
- messageCount → int
-
Number of messages.
no setter
- participantCount → int
-
Number of participants.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stepCount → int
-
Number of steps in the timeline.
no setter
- theme → SequenceDiagramTheme
-
Theme for rendering.
final
- width → int
-
Render width in cells.
final
Methods
-
copyWith(
{String? mermaid, int? width, int? height, SequenceDiagramTheme? theme}) → SequenceDiagramModel - Creates a copy with the given fields replaced.
-
init(
) → Cmd? -
Returns an optional command to execute on program startup.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Msg msg) → (SequenceDiagramModel, Cmd?) -
Updates the component state in response to a message.
override
-
view(
) → String -
Renders the current model state for display.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited