RichText.dateTime constructor
const
RichText.dateTime({
- @JsonKey.new(name: 'type') @Default.new(RichTextType.dateTime) RichTextType type,
- @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
- @JsonKey.new(name: 'unix_time') required int unixTime,
- @JsonKey.new(name: 'date_time_format') required String dateTimeFormat,
Formatted date and time.
Implementation
const factory RichText.dateTime({
/// Type of the rich text, always "date_time"
@JsonKey(name: 'type') @Default(RichTextType.dateTime) RichTextType type,
/// The text
@JsonKey(name: 'text') @RichTextConverter() required RichText text,
/// The Unix time associated with the entity
@JsonKey(name: 'unix_time') required int unixTime,
/// The string that defines the formatting of the date and time.
@JsonKey(name: 'date_time_format') required String dateTimeFormat,
}) = RichTextDateTime;