LinkGroupComponent class

A group of related links component.

Collects links and renders them as a numbered list of footnotes.

final links = LinkGroupComponent();
final ref1 = links.add('https://dart.cn', text: 'Dart');
final ref2 = links.add('https://flutter.cn', text: 'Flutter');
print('See $ref1 and $ref2');
links.renderln(context); // Renders: [1] https://dart.cn  [2] https://flutter.cn
Inheritance
Available extensions

Constructors

LinkGroupComponent({String prefix = 'link', RenderConfig renderConfig = const RenderConfig()})

Properties

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

Methods

add(String url, {String? text, bool styled = false}) String
Adds a link to the group and returns a reference string.
clear() → void
Clears all collected links.
Creates a link string without adding to the group (for inline use).
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