toJson method

dynamic toJson()

Implementation

toJson() {
  Map<String, dynamic> data = {
    "type": type.index,
    "left": left,
    "top": top,
    "width": width,
    "height": height
  };
  // if (width != null && height != null) {
  //   data["width"] = width;
  //   data["height"] = height;
  // }
  if (keepAspectRatio != null) {
    data["keepAspectRatio"] = keepAspectRatio?.index;
  }
  final Map<String, dynamic>? param = mutiMixerContentParams?.toJson();
  if (param != null && param.isNotEmpty) {
    data["param"] = param;
  }
  return data;
}