TreeLineContainer class
树形连线容器
在节点前面添加一个固定宽度的容器来绘制树形连线
主要功能
连线类型
- L形连线: 用于最后一个子节点 └
- T形连线: 用于中间子节点 ├
- 垂直连线: 用于父节点的垂直延伸 │
- 无连线: 用于根节点
布局特点
- 固定宽度的连线区域
- 不会被节点内容覆盖
- 精确的连线位置控制
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TreeLineContainer
- Available extensions
Constructors
- TreeLineContainer({Key? key, required TreeViewNode node, required Widget child, Color lineColor = Colors.grey, Color? parentLineColor, double strokeWidth = 1.0, required double indent, required double height, bool useParentDashedLine = true})
-
创建树形连线容器
const
Properties
- child → Widget
-
节点内容
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
连线区域高度
final
- indent → double
-
每级缩进距离
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lineColor → Color
-
当前节点连线颜色
final
- node → TreeViewNode
-
树节点
final
- parentLineColor → Color?
-
父级连线颜色
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeWidth → double
-
连线粗细
final
- useParentDashedLine → bool
-
父级连线是否使用虚线
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
buildPageRoute<
T> ({RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, bool opaque = true}) → PageRoute< T> -
Available on Widget, provided by the JunnyWidgetExtension extension
构建PageRoute -
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited