toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "id": encodeValue(id),
      "name": encodeValue(name),
      if (about != null) "about": encodeValue(about),
      "channel": encodeValue(channel),
      "purpose": encodeValue(purpose),
      "locale": encodeValue(locale),
      "status": encodeValue(status),
      "version": encodeValue(version),
      if (publishedVersion != null)
        "published_version": encodeValue(publishedVersion),
      "draft_version": encodeValue(draftVersion),
      "has_unpublished_changes": encodeValue(hasUnpublishedChanges),
      if (variables != null) "variables": encodeValue(variables),
      if (sms != null) "sms": encodeValue(sms),
      if (email != null) "email": encodeValue(email),
      if (attachments != null) "attachments": encodeValue(attachments),
      "created_at": encodeValue(createdAt),
      "updated_at": encodeValue(updatedAt),
      if (publishedAt != null) "published_at": encodeValue(publishedAt),
      if (archivedAt != null) "archived_at": encodeValue(archivedAt),
    };