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(),
    'width': this.width,
    'color': this.color?.value.toRadixString(16),
    'lineDashType': this.lineDashType?.index,
    'zIndex': this.zIndex,
    'visible': this.visible
  };
}