toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'runId': runId,
      'currentStep': currentStep,
      'budget': budget.toJson(),
      if (history.isNotEmpty)
        'history': history.map((h) => h.toJson()).toList(),
      if (escalated) 'escalated': true,
      if (outcome != null) 'outcome': outcome!.toJson(),
    };