Map<String, dynamic> toJson() { return <String, dynamic>{ 'fillType': path.fillType.index, 'steps': steps.map((OperationStep step) => step.toJson()).toList(), }; }