trackRxCreation static method

void trackRxCreation(
  1. Rx rx,
  2. String? name
)

Track Rx creation (only called when enabled) Internal use only - called from Rx constructor

Implementation

static void trackRxCreation(Rx<dynamic> rx, String? name) {
  if (!_enabled || !_trackDependencies) return;

  final id = getRxId(rx);
  _rxRegistry[id] = _RxInfo(
    id: id,
    name: name ?? rx.runtimeType.toString(),
    type: rx.runtimeType.toString(),
    createdAt: DateTime.now(),
  );

  // Store reference for state inspector
  _rxRefs[id] = rx;

  _stateNodes[id] = _StateNode(
    id: id,
    type: 'Rx',
    name: name ?? rx.runtimeType.toString(),
  );
}