indentation property

TreeSliverIndentationType indentation
final

The number of pixels children will be offset by in the cross axis based on their TreeSliverNode.depth.

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

Implementation

final TreeSliverIndentationType indentation;