toJson method
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(),
};