toJson method
Implementation
Map<String, Object?> toJson() {
final nextBatch = this.nextBatch;
final prevBatch = this.prevBatch;
final recursionDepth = this.recursionDepth;
return {
'chunk': chunk.map((v) => v.toJson()).toList(),
if (nextBatch != null) 'next_batch': nextBatch,
if (prevBatch != null) 'prev_batch': prevBatch,
if (recursionDepth != null) 'recursion_depth': recursionDepth,
};
}