internalUpdateTheme method

void internalUpdateTheme(
  1. NodeFlowTheme theme
)

Updates the theme on an already-initialized controller.

@internal - This method is for internal use by NodeFlowEditor only. Do not call directly from application code.

This should only be called after internalInitController has been called. For initial setup, use internalInitController instead.

Implementation

void internalUpdateTheme(NodeFlowTheme theme) {
  if (!_editorInitialized) {
    throw StateError(
      'Cannot update theme before controller is initialized. '
      'Call internalInitController first.',
    );
  }

  // Update the connection painter's theme
  _connectionPainter?.updateTheme(theme);

  // Update observable theme - this triggers reactions for spatial index rebuild
  runInAction(() => _themeObservable.value = theme);
}