toMap method

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

model -> map

Implementation

@override
Map<String, Object> toMap() {
  return {
    'id': this.getId(),
    '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,
    'lineDashType': this.lineDashType.index,
    'lineCapType': this.lineCapType.index,
    'lineJoinType': this.lineJoinType.index,
    'clickable': this.clickable,
    'isKeepScale': this.isKeepScale,
    'isFocus': this.isFocus,
    'zIndex': this.zIndex,
    'visible': this.visible
  };
}