toJson method

Map<String, dynamic> toJson ()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['id'] = this.id;
  data['name'] = this.name;
  data['description'] = this.description;
  data['enabled'] = this.enabled;
  data['color'] = this.color;
  data['width'] = this.width;
  data['stop_ids'] = this.stopIds;
  data['created'] = this.created;
  data['updated'] = this.updated;
  if (this.points != null) {
    data['points'] = this.points.map((v) => v.toJson()).toList();
  }
  data['active'] = this.active;
  if (this.schedule != null) {
    data['schedule'] = this.schedule.map((v) => v.toJson()).toList();
  }
  return data;
}