toJson method

Map<String, Object?> toJson()

Implementation

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