RichBlock.buttons constructor

const RichBlock.buttons({
  1. @JsonKey.new(name: 'type') @Default.new(RichBlockType.buttons) RichBlockType type,
  2. @JsonKey.new(name: 'buttons') required List<RichMessageButton> buttons,
  3. @JsonKey.new(name: 'align') String? align,
})

A block containing a list of buttons that are shown in one row, corresponding to the custom HTML tag <tg-button-row>.

Implementation

const factory RichBlock.buttons({
  /// Type of the block, always "buttons"
  @JsonKey(name: 'type') @Default(RichBlockType.buttons) RichBlockType type,

  /// The buttons
  @JsonKey(name: 'buttons') required List<RichMessageButton> buttons,

  /// Optional. Horizontal alignment of the buttons. Currently, must be one
  /// of “left”, “center”, or “right”.
  @JsonKey(name: 'align') String? align,
}) = RichBlockButtons;