styleGet method
Returns the current value of the specified style property for the first (non-null) element in the selection.
selection.styleGet("color"); // "red"
The current value is defined as the element’s inline value, if present, and otherwise its computed value. Accessing the current style value is generally useful only if you know the selection contains exactly one element.
Implementation
String? styleGet(String name) {
return style(node(), name);
}