toJson method
Implementation
Map<String, dynamic> toJson() => {
'cell_type': cellType,
'source': source,
if (metadata != null) 'metadata': metadata,
if (cellType == 'code') 'outputs': outputs ?? [],
if (cellType == 'code') 'execution_count': executionCount,
};