toJson method

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

Implementation

@override
Map<String, dynamic> toJson() => {
      "shape": shapeName,
      "x": x,
      "y": y,
      "width": width,
      "height": height,
      if (color != null) "color": color.toString(),
      if (strokeSize != null) 'strokeSize': strokeSize,
      if (backgroundColor != null)
        "backgroundColor": backgroundColor.toString(),
    };