toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type,
    'object': object.toJson(),
    if (name != null) 'name': name,
    if (startLocation != null) 'startLocation': startLocation!.toJson(),
    if (endLocation != null) 'endLocation': endLocation!.toJson(),
  };
}