diff --git a/lib/src/tree_node.dart b/lib/src/tree_node.dart index f293d2b..d2f40c5 100644 --- a/lib/src/tree_node.dart +++ b/lib/src/tree_node.dart @@ -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; @@ -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, @@ -76,7 +76,7 @@ class _TreeNodeState extends State 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, @@ -209,7 +209,7 @@ class _TreeNodeState extends State 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)), ), ) diff --git a/lib/src/tree_view.dart b/lib/src/tree_view.dart index f1afbfc..5cffbaa 100644 --- a/lib/src/tree_view.dart +++ b/lib/src/tree_view.dart @@ -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; @@ -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', @@ -168,7 +168,7 @@ class _TreeViewState extends State { data: _renderList[index], icon: widget.icon, lazy: widget.lazy, - offsetLeft: widget.offsetLeft, + offset: widget.offset, maxLines: widget.maxLines, showCheckBox: widget.showCheckBox, showActions: widget.showActions,