toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() => {
      "shape": shapeName,
      "x1": x1,
      "y1": y1,
      "x2": x2,
      "y2": y2,
      "size": size,
      if (color != null) "color": color.toString(),
    };