toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  final map = {
    "lon": centerPoint.longitude,
    "lat": centerPoint.latitude,
    "key": key,
    "strokeWidth": strokeWidth,
    "color": color.toARGBList(),
  };
  if (borderColor != null) {
    map.putIfAbsent("colorBorder", () => borderColor!.toARGBList());
  }
  return map;
}