Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/src/tree_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TreeNode extends StatefulWidget {
final bool showCheckBox;
final bool showActions;
final bool contentTappable;
final double offsetLeft;
final double offset;
final int? maxLines;

final Function(TreeNodeData node) onTap;
Expand All @@ -35,7 +35,7 @@ class TreeNode extends StatefulWidget {
required this.data,
required this.parent,
this.parentState,
required this.offsetLeft,
required this.offset,
this.maxLines,
required this.showCheckBox,
required this.showActions,
Expand Down Expand Up @@ -76,7 +76,7 @@ class _TreeNodeState extends State<TreeNode> with SingleTickerProviderStateMixin
icon: widget.icon,
lazy: widget.lazy,
load: widget.load,
offsetLeft: widget.offsetLeft,
offset: widget.offset,
maxLines: widget.maxLines,
showCheckBox: widget.showCheckBox,
showActions: widget.showActions,
Expand Down Expand Up @@ -209,7 +209,7 @@ class _TreeNodeState extends State<TreeNode> with SingleTickerProviderStateMixin
SizeTransition(
sizeFactor: _rotationController,
child: Padding(
padding: EdgeInsets.only(left: widget.offsetLeft),
padding: EdgeInsets.symmetric(horizontal: widget.offset),
child: Column(children: _geneTreeNodes(widget.data.children)),
),
)
Expand Down
6 changes: 3 additions & 3 deletions lib/src/tree_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TreeView extends StatefulWidget {

final bool lazy;
final Widget icon;
final double offsetLeft;
final double offset;
final int? maxLines;
final bool showFilter;
final String filterPlaceholder;
Expand Down Expand Up @@ -45,7 +45,7 @@ class TreeView extends StatefulWidget {
this.append,
this.load,
this.lazy = false,
this.offsetLeft = 24.0,
this.offset = 24.0,
this.maxLines,
this.showFilter = false,
this.filterPlaceholder = 'Search',
Expand Down Expand Up @@ -168,7 +168,7 @@ class _TreeViewState extends State<TreeView> {
data: _renderList[index],
icon: widget.icon,
lazy: widget.lazy,
offsetLeft: widget.offsetLeft,
offset: widget.offset,
maxLines: widget.maxLines,
showCheckBox: widget.showCheckBox,
showActions: widget.showActions,
Expand Down