BranchLine class abstract

Abstract base class for defining tree branch line styles.

BranchLine defines how visual connections are drawn between parent and child nodes in tree views. Different implementations provide various visual styles from no lines to complex path-based connections.

The class provides static instances for common branch line styles:

Custom implementations can be created by extending this class and implementing the build method to return appropriate connection widgets.

Example:

// Using built-in styles
TreeView(
  branchLine: BranchLine.path, // Connected paths
  // ... other properties
);

// Custom branch line implementation
class CustomBranchLine extends BranchLine {
  @override
  Widget build(BuildContext context, List<TreeNodeDepth> depth, int index) {
    return CustomPaint(painter: MyCustomLinePainter());
  }
}
Implementers

Constructors

BranchLine.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, List<TreeNodeDepth> depth, int index) Widget
Builds the visual representation of branch lines for a tree node.
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

Constants

line → const IndentGuideLine
Predefined branch line style with simple vertical lines.
none → const IndentGuideNone
Predefined branch line style with no visual connections.
path → const IndentGuidePath
Predefined branch line style with connected path lines.