toJson method

Map<String, dynamic> toJson()

Returns the data fields of Geofence in JSON format.

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'data': data,
    'latitude': latitude,
    'longitude': longitude,
    'radius': radius.map((e) => e.toJson()).toList(),
    'status': status,
    'timestamp': timestamp,
    'remainingDistance': _remainingDistance
  };
}