flutter_tree_view
flutter_tree_view copied to clipboard
Would be better if TreeNode<T>
Very nice lib! It would be better if treeNode has generic type to make it easier to access data's fields without cast.
Hey, thank you for trying the package out!
I have worked with that before but <T> was lost somewhere and I still had to cast it in the example.
Any suggestions on how to approach this without making every class accept generics?
Any suggestions on how to approach this without making every class accept generics?
For now I haven't figured out a solution, or It might be suggested to write generics everywhere according to linter:rules - always_specify_types
For now I haven't figured out a solution, or It might be suggested to write generics everywhere according to linter:rules - always_specify_types
It's also written in there that we should use Object if we need that variable to override == and hashcode.
With generics I can't guarantee that the variable won't be dynamic.
Edit: perhaps using <T extends Object> would solve that issue...
Sure, I didn't see that. Could give it a try