SankeyNodeThemeManager class
Utility class for managing node theming
This class provides methods to retrieve a node's color and contrast text color based on its label. If a custom color is not specified in nodeColors, a color from defaultNodeColors is chosen based on a hash of the node's label
Constructors
-
SankeyNodeThemeManager.new(Map<
String, Color> nodeColors)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
nodeColors
→ Map<
String, Color> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getColor(
String label) → Color -
Returns the color associated with the given
label
-
getTextColor(
String label) → Color -
Returns an appropriate text color (white or black) for the background color
assigned to the given
label
to ensure legible contrast -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited