Make it possible to use custom Widgets for icon and label + add trailing widget

Issue #26 resolved
Sergey Tikhonov created an issue

I would love to pass a custom widget or even builder method instead of proprietary NodeIcon icon and terse String label properties.

And I think it should follow Flutter’s idea of naming these UI pieces, like in GridTileBar:

https://api.flutter.dev/flutter/material/GridTileBar/leading.html

https://api.flutter.dev/flutter/material/GridTileBar/title.html

https://api.flutter.dev/flutter/material/GridTileBar/trailing.html

Comments (6)

  1. Kevin Armstrong

    This has been on my radar for a bit. I’ll have to think a good a way to do it without breaking existing code.

  2. Pedro Lanzagorta

    I agree, the only thing keeping me from using this library is that my project requires each node to have both a label and a trailing numerical value.

  3. Sergey Tikhonov Account Deactivated reporter

    I’ll have to think a good a way to do it without breaking existing code.

    Looking at Flutter’s ideology it seems okay to make a breaking change. Anyway that’s a change for good

  4. Magnus Johansson

    This is the only reason I cannot switch to this library. My requirements are to be able to add custom icons, widgets, PopupMenus etc.

    Ideally one should be able to have full control over the List item rendering.

    Don’t worry about breaking changes. It’s called progress and evolution!

  5. Kevin Armstrong

    Added node builder to TreeView to allow custom display of node data. Builder function accepts build context and Node as parameters.

  6. Log in to comment