toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final end = this.end;
  final state = this.state;
  return {
    'chunk': chunk.map((v) => v.toJson()).toList(),
    if (end != null) 'end': end,
    'start': start,
    if (state != null) 'state': state.map((v) => v.toJson()).toList(),
  };
}