toMap method Null safety

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

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'id': this.id,
    'coordinates': this.coordinates.map((coord) => coord.toMap()).toList(),
    'indexs': this.indexs.map((index) => index).toList(),
    'width': this.width,
    'colors':
        this.colors?.map((color) => color.value.toRadixString(16)).toList(),
    'textures': this.textures,
    'dottedLine': this.dottedLine,
    'lineDashType': this.lineDashType?.index,
    'lineCapType': this.lineCapType?.index,
    'lineJoinType': this.lineJoinType?.index,
    'lineDirectionCross180': this.lineDirectionCross180?.index,
    'isThined': this.isThined,
    'clickable': this.clickable,
    'isKeepScale': this.isKeepScale,
    'isFocus': this.isFocus,
    'zIndex': this.zIndex,
    'visible': this.visible
  };
}