ConversationPart constructor

const ConversationPart({
  1. @JsonKey(name: 'id', required: true) required String id,
  2. @JsonKey(name: 'partType', required: true) required String partType,
  3. @JsonKey(name: 'body', required: true) required String body,
  4. @JsonKey(name: 'bodyText') String? bodyText,
  5. @JsonKey(name: 'channel') String? channel,
  6. @JsonKey(name: 'createdAt', required: true) required DateTime createdAt,
  7. @JsonKey(name: 'author') required ConversationParticipant? author,
})

Implementation

const factory ConversationPart({
  /// Part Id
  @JsonKey(name: 'id', required: true) required String id,

  /// Part type
  ///
  /// Known types: admin_note, email_msg
  @JsonKey(name: 'partType', required: true) required String partType,

  /// Full body
  @JsonKey(name: 'body', required: true) required String body,

  /// Body converted to text
  ///
  /// Only returned when in lastRenderablePart
  @JsonKey(name: 'bodyText') String? bodyText,

  /// Conversation channel
  ///
  /// Only returned when in lastRenderablePart
  @JsonKey(name: 'channel') String? channel,

  /// When the part was created
  @JsonKey(name: 'createdAt', required: true) required DateTime createdAt,

  /// Who the author of the part is
  ///
  /// If no author part is not a message
  @JsonKey(name: 'author') required ConversationParticipant? author,
}) = _ConversationPart;