RichText.button constructor

const RichText.button({
  1. @JsonKey.new(name: 'type') @Default.new(RichTextType.button) RichTextType type,
  2. @JsonKey.new(name: 'button') required RichMessageButton button,
})

A button.

Implementation

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

  /// The button
  @JsonKey(name: 'button') required RichMessageButton button,
}) = RichTextButton;