ConversationPart constructor
const
ConversationPart({
- @JsonKey(name: 'id', required: true) required String id,
- @JsonKey(name: 'partType', required: true) required String partType,
- @JsonKey(name: 'body', required: true) required String body,
- @JsonKey(name: 'bodyText') String? bodyText,
- @JsonKey(name: 'channel') String? channel,
- @JsonKey(name: 'createdAt', required: true) required DateTime createdAt,
- @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;