toJson method

Map<String, dynamic> toJson()

Returns a JSON object which represents this object.

Implementation

Map<String, dynamic> toJson() {
  return {
    ApiFields.direction0:
        direction0.map((direction) => direction.toJson()).toList(),
    ApiFields.direction1:
        direction1.map((direction) => direction.toJson()).toList(),
    ApiFields.name: name,
  };
}