Comment class
A fluent builder for creating styled comments.
final comment = Comment()
.text('This is a comment')
.style(Style().foreground(Colors.gray).italic())
.render();
print(comment);
- Inheritance
- Available extensions
Constructors
- Comment({RenderConfig renderConfig = const RenderConfig()})
- Creates a new empty comment builder.
Properties
Methods
-
init(
) → Cmd? -
Returns an optional command to execute on program startup.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prefix(
String prefix) → Comment - Sets the comment prefix (default: '//').
-
render(
) → String -
Renders the component as a string.
override
-
style(
Style style) → Comment - Sets the comment style.
-
text(
String text) → Comment - Sets the comment text.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Msg msg) → (ViewComponent, Cmd?) -
Updates the component state in response to a message.
inherited
-
view(
) → String -
Renders the current model state for display.
inherited
-
writelnTo(
Console io) → void -
Available on DisplayComponent, provided by the DisplayComponentExtension extension
Renders the component and writes it to the console.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited