MermaidStyle class

Global style configuration for Mermaid diagrams

Constructors

MermaidStyle({int backgroundColor = MermaidColors.defaultBackground, NodeStyle defaultNodeStyle = const NodeStyle(fillColor: MermaidColors.defaultNodeFill, strokeColor: MermaidColors.defaultNodeStroke, textColor: MermaidColors.defaultTextColor), EdgeStyle defaultEdgeStyle = const EdgeStyle(strokeColor: MermaidColors.defaultEdgeColor), double nodeSpacingX = 50.0, double nodeSpacingY = 50.0, double padding = 20.0, String? fontFamily, MermaidThemeMode themeMode = MermaidThemeMode.light, Map<String, NodeStyle> classDefs = const {}})
Creates a Mermaid style configuration
const
MermaidStyle.dark()
Creates a dark theme style
factory
MermaidStyle.forest()
Creates a forest theme style
factory
MermaidStyle.neutral()
Creates a neutral theme style
factory

Properties

backgroundColor → int
Background color (as ARGB int)
final
classDefs → Map<String, NodeStyle>
Custom class definitions (classDef statements)
final
defaultEdgeStyle → EdgeStyle
Default style for edges
final
defaultNodeStyle → NodeStyle
Default style for nodes
final
fontFamily → String?
Font family for text
final
hashCode → int
The hash code for this object.
no setterinherited
nodeSpacingX → double
Horizontal spacing between nodes
final
nodeSpacingY → double
Vertical spacing between nodes
final
padding → double
Padding around the diagram
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
themeMode → MermaidThemeMode
Theme mode
final

Methods

copyWith({int? backgroundColor, NodeStyle? defaultNodeStyle, EdgeStyle? defaultEdgeStyle, double? nodeSpacingX, double? nodeSpacingY, double? padding, String? fontFamily, MermaidThemeMode? themeMode, Map<String, NodeStyle>? classDefs}) → MermaidStyle
Creates a copy with modified properties
getNodeStyle(String? className) → NodeStyle
Gets the node style for a specific class or returns default
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