google / flutter.widgets

https://pub.dev/packages/flutter_widgets
BSD 3-Clause "New" or "Revised" License
1.37k stars 479 forks source link

Reduce gap between treenods in flutter_simple_treeview #438

Open Dooardarshan opened 1 year ago

Dooardarshan commented 1 year ago

i was wondering is there a way to Reduce the gap between treenods in flutter_simple_treeview. i takes so much space

ramanjitsingh-hub commented 1 year ago

Yes, you can reduce the gap between tree nodes in flutter_simple_treeview by using the horizontalGap and verticalGap properties. These properties control the horizontal and vertical space between nodes in the tree, respectively.

Here is an example of how you can use these properties to reduce the gap between tree nodes:

SimpleTreeView(
  horizontalGap: 5,
  verticalGap: 5,
  children: [
    // Tree nodes go here
  ],
),

In this example, the horizontalGap and verticalGap properties are set to 5, which will reduce the gap between the tree nodes by that amount. You can adjust these values to achieve the desired gap size in your tree.

bambinoua commented 1 year ago

@ramanjitsingh-hub what SimpleTreeView was you talking about? Where is this class??