TreeSliverIndentationType class

The style of indentation for TreeSliverNodes in a TreeSliver, as handled by RenderTreeSliver.

By default, the indentation is handled by RenderTreeSliver. Child nodes are offset by the indentation specified by TreeSliverIndentationType.value in the cross axis of the viewport. This means the space allotted to the indentation will not be part of the space made available to the Widget returned by TreeSliver.treeNodeBuilder.

Alternatively, the indentation can be implemented in TreeSliver.treeNodeBuilder, with the depth of the given tree row accessed by TreeSliverNode.depth. This allows for more customization in building tree rows, such as filling the indented area with decorations or ink effects.

This example shows a highly customized TreeSliver configured to TreeSliverIndentationType.none. This allows the indentation to be handled by the developer in TreeSliver.treeNodeBuilder, where a decoration is used to fill the indented space.
link

To create a local project with this code sample, run:
flutter create --sample=rendering.TreeSliverIndentationType.1 mysample

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double
The number of pixels by which TreeSliverNodes will be offset according to their TreeSliverNode.depth.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

custom(double value) TreeSliverIndentationType
Configures a custom offset for indenting child nodes in a TreeSliver.

Constants

none → const TreeSliverIndentationType
Configures no offsetting of child nodes in a TreeSliver.
standard → const TreeSliverIndentationType
The default indentation of child TreeSliverNodes in a TreeSliver.