TreeLineContainer constructor

const TreeLineContainer({
  1. Key? key,
  2. required TreeViewNode node,
  3. required Widget child,
  4. Color lineColor = Colors.grey,
  5. Color? parentLineColor,
  6. double strokeWidth = 1.0,
  7. required double indent,
  8. required double height,
  9. bool useParentDashedLine = true,
})

创建树形连线容器

参数

  • node 树节点,用于获取深度和父子关系信息
  • child 节点内容 Widget
  • lineColor 当前节点连线颜色,默认为灰色
  • parentLineColor 父级连线颜色,默认为浅灰色
  • strokeWidth 连线粗细,默认为1.0
  • indent 每级缩进距离,必需参数
  • height 连线区域高度,必需参数
  • useParentDashedLine 父级连线是否使用虚线,默认为true

Implementation

const TreeLineContainer({
  super.key,
  required this.node,
  required this.child,
  this.lineColor = Colors.grey,
  this.parentLineColor,
  this.strokeWidth = 1.0,
  required this.indent,
  required this.height,
  this.useParentDashedLine = true,
});