addStep static method

void addStep(
  1. String stepId,
  2. Map<String, dynamic> stepData
)

Adds a step to the cache (useful for testing or dynamic steps)

Implementation

static void addStep(String stepId, Map<String, dynamic> stepData) {
  __.in_('addStep');
  try {
    final instance = ChatScriptLoader();
    instance._scriptDataCache[stepId] = Map<String, dynamic>.from(stepData);
    __.info('Added step to cache: $stepId');
  } catch (e, stackTrace) {
    __.severe('Failed to add step $stepId to cache', e, stackTrace);
  } finally {
    __.out_('addStep');
  }
}