TreeViewTheme class

A simple class to control the theming of TreeView.

Makes it easy to customize NodeWidget and LinesWidget.

Example of indent & lineThickness relationship.

 /*             <- indent ->
   -------------------------------------
   |                 |                 |
   |                 |                 |
   |               <-|-> lineThickness |
   |                 |                 |
   |                 |                 |
   -------------------------------------  */

A single line will be drawn at the middle of indent with thickness of lineThickness as shown above.

Play around to find the combination of values that better fits you.

Make sure indent >= lineThickness.

Constructors

TreeViewTheme({Color lineColor = Colors.grey, LineStyle lineStyle = LineStyle.connected, double lineThickness = 2.0, double indent = 40.0, bool roundLineCorners = false})
Creates a TreeViewTheme.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
indent double
Used to calculate the spacing of each nesting level of TreeNode.
final
lineColor Color
The color used to draw the lines.
final
lineStyle LineStyle
The style used to draw the lines of TreeView.
final
lineThickness double
The width of a single line.
final
roundLineCorners bool
Set to true if you want to round the corners of LineStyle.connected.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({Color? lineColor, LineStyle? lineStyle, double? lineThickness, double? indent, bool? roundLineCorners}) TreeViewTheme
Returns a copy of this object with new attributes.
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 ==(covariant TreeViewTheme other) bool
The equality operator.
override