RichText.customEmoji constructor

const RichText.customEmoji({
  1. @JsonKey.new(name: 'type') @Default.new(RichTextType.customEmoji) RichTextType type,
  2. @JsonKey.new(name: 'custom_emoji_id') required String customEmojiId,
  3. @JsonKey.new(name: 'alternative_text') required String alternativeText,
})

A custom emoji.

Implementation

const factory RichText.customEmoji({
  /// Type of the rich text, always "custom_emoji"
  @JsonKey(name: 'type') @Default(RichTextType.customEmoji) RichTextType type,

  /// Unique identifier of the custom emoji
  @JsonKey(name: 'custom_emoji_id') required String customEmojiId,

  /// Alternative emoji for the custom emoji
  @JsonKey(name: 'alternative_text') required String alternativeText,
}) = RichTextCustomEmoji;