toJson method

Map<String, dynamic> toJson()

Returns a JSON representation of this TrackCircuitNeighbor.

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    ApiFields.circuitIds:
        circuitIds.map((e) => int.tryParse(e) ?? -1).toList(),
    ApiFields.neighborType: neighborType.value,
  };
}