toMap method Null safety

  1. @override
Map<String, Object?> toMap()

model -> map

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'modelPath': this.modelPath,
    'modelName': this.modelName,
    'scale': this.scale,
    'zoomFixed': this.zoomFixed,
    'rotateX': this.rotateX,
    'rotateY': this.rotateY,
    'rotateZ': this.rotateZ,
    'offsetX': this.offsetX,
    'offsetY': this.offsetY,
    'type': this.type?.index
  };
}