GroupedDefinitionList class

A fluent builder for creating grouped definition lists.

Supports multiple groups with headers.

final list = GroupedDefinitionList()
    .group('Package Info', {
      'Name': 'artisanal',
      'Version': '1.0.0',
    })
    .group('Dependencies', {
      'dart': '^3.0.0',
      'meta': '^1.9.0',
    })
    .headerStyle(Style().bold().underline())
    .render();

print(list);
Inheritance
Available extensions

Constructors

GroupedDefinitionList({RenderConfig renderConfig = const RenderConfig()})
Creates a new empty grouped definition list builder.

Properties

hashCode int
The hash code for this object.
no setterinherited
lineCount int
Number of lines in render.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

alignAcrossGroups(bool value) GroupedDefinitionList
Sets whether to align terms across all groups (default: false).
alignTerms(bool value) GroupedDefinitionList
Sets whether to align terms within each group (default: true).
descriptionStyle(Style style) GroupedDefinitionList
Sets the description style.
gap(int value) GroupedDefinitionList
Sets the gap between term and description (default: 1).
group(String header, Map<String, String> items) GroupedDefinitionList
Adds a group with a header and items.
groupIndent(int value) GroupedDefinitionList
Sets the group header indent (default: 0).
groupSpacing(int value) GroupedDefinitionList
Sets the spacing between groups (default: 1).
headerStyle(Style style) GroupedDefinitionList
Sets the header style.
indent(int value) GroupedDefinitionList
Sets the item indent within groups (default: 2).
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
separator(String sep) GroupedDefinitionList
Sets the separator between term and description (default: ':').
separatorStyle(Style style) GroupedDefinitionList
Sets the separator style.
styleFunc(DefinitionStyleFunc func) GroupedDefinitionList
Sets a style function for dynamic styling.
termStyle(Style style) GroupedDefinitionList
Sets the term style.
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