setTheme method
Set the theme and update the connection painter This is called internally by the editor widget only
Implementation
void setTheme(NodeFlowTheme theme) {
_theme = theme;
// Create painter if it doesn't exist, otherwise update its theme
if (_connectionPainter == null) {
_connectionPainter = ConnectionPainter(
theme: theme,
// Cast to Node<dynamic> since ConnectionPainter is not generic
nodeShape: _nodeShapeBuilder != null
? (node) => _nodeShapeBuilder!(node as Node<T>)
: null,
);
} else {
_connectionPainter!.updateTheme(theme);
}
}