toJson method

Map toJson()

Implementation

Map toJson() {
  Map _result = {};

  if (!landmarks.isEmpty) {
    var list = [];
    for (var item in landmarks) list.add(item!.toJson());
    _result.addAll({"landmarks": list});
  }
  if (rect != null) _result.addAll({"rect": rect!.toJson()});
  if (cropImage != null) _result.addAll({"cropImage": cropImage});
  if (rotationAngle != null) _result.addAll({"rotationAngle": rotationAngle});

  return _result;
}