TitledBlockComponent class

A simple titled block used by the artisanal-style I/O facade.

Renders a styled title line, then indented message lines:

  TITLE
  line 1
  line 2
Inheritance
Available extensions

Constructors

TitledBlockComponent({required String title, required Object message, required Style titleStyle, int indent = 2, RenderConfig renderConfig = const RenderConfig()})
const
TitledBlockComponent.error({required String title, required Object message, int indent = 2, RenderConfig renderConfig = const RenderConfig()})
TitledBlockComponent.info({required String title, required Object message, int indent = 2, RenderConfig renderConfig = const RenderConfig()})
TitledBlockComponent.success({required String title, required Object message, int indent = 2, RenderConfig renderConfig = const RenderConfig()})
TitledBlockComponent.warning({required String title, required Object message, int indent = 2, RenderConfig renderConfig = const RenderConfig()})

Properties

hashCode int
The hash code for this object.
no setterinherited
indent int
final
lineCount int
Number of lines in render.
no setterinherited
message Object
final
renderConfig RenderConfig
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
final
titleStyle Style
final

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
render() String
Renders the component as a string.
override
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