toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (startDate != null) {
    json[r'startDate'] = startDate!.toUtc().toIso8601String();
  }
  if (endDate != null) {
    json[r'endDate'] = endDate!.toUtc().toIso8601String();
  }
  if (comment != null) {
    json[r'comment'] = comment;
  }
  return json;
}