Unable to set color of Node icon to a variable
Hi! Wonderful package, but after updating I can’t seem to get the colors on node icons to be dynamic, as was possible before.
I understand that now it is based on the color scheme, but this excludes the possibility of having a separate color per every node. Previously I had one kind of icon with a separate color depending on what kind of node it was. (For example a pdf-file, a word-file, or excel document, or a folder if it was a parent). This is possible with the icon itself, but not its color.
Is it possible to fetch the color from the flutter source `Icon()`, which contains a color argument?
For example:
Node(
key: UniqueKey().toString(),
label: this.title!,
data: this,
icon: Icon(iconData, color: iconColor),
);
Or any other way that would not break existing code? Or is this already supported in some other way?
Comments (3)
-
-
- changed status to resolved
Fixes issue
#49. Added ability to add specific color to node icon using iconColor and selectedIconColor property. This replaces the previous ability to do this using the removed NodeIcon class.Fixes issue
#40,#41. Updated example and documentation.→ <<cset 3bd16e33b3dc>>
-
reporter Fantastic, this works like a treat! Thank you for the quick resolution!
- Log in to comment
Interesting! Let me check that out to see what the problem is.