toJson method

Map<String, dynamic> toJson()

Returns the data fields of PolyGeofence in JSON format.

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'data': data,
    'polygon': polygon.map((e) => e.toJson()).toList(),
    'status': _status,
    'timestamp': _timestamp
  };
}