toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
      'id': id,
      'type': type,
      if (title != null) 'title': title,
      if (flow != null) 'flow': flow,
      if (description != null) 'description': description,
      if (tags.isNotEmpty) 'tags': [...tags]..sort(),
      'source': source,
      'sourceRef': sourceRef.toJson(),
    };