TreeComponent class
A tree structure component.
TreeComponent(
data: {
'src': {
'lib': ['main.dart', 'utils.dart'],
'test': ['main_test.dart'],
},
'pubspec.yaml': null,
},
).renderln(context);
- Inheritance
-
- Object
- Model
- ViewComponent
- StaticComponent
- DisplayComponent
- TreeComponent
- Available extensions
Constructors
-
TreeComponent({required Map<
String, dynamic> data, bool showRoot = false, String rootLabel = '.', TreeEnumerator enumerator = TreeEnumerator.normal, TreeStyleFunc? itemStyleFunc, RenderConfig renderConfig = const RenderConfig()}) -
Creates a TreeComponent with optional enumerator.
const
Properties
-
data
→ Map<
String, dynamic> -
final
- enumerator → TreeEnumerator
-
The tree enumerator (branch characters) to use.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemStyleFunc → TreeStyleFunc?
-
Optional callback for per-item styling.
final
- lineCount → int
-
Number of lines in render.
no setterinherited
- renderConfig → RenderConfig
-
final
- rootLabel → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showRoot → bool
-
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