toJson method

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

Returns a JSON object representation of this instance.

Implementation

@override
Map<String,dynamic> toJson() {
  Map<String,dynamic> data = super.toJson();

  data["autoClose"] = autoClose;
  data["curves"] = [];

  for (int i = 0, l = curves.length; i < l; i++) {
    final curve = curves[i];
    data["curves"].add(curve.toJson());
  }

  return data;
}