ReplyMarkup class sealed
Represents a ReplyMarkup that can be used to send a message with custom keyboard, instructions to hide keyboard or to force a reply from the user.
- Implementers
- Annotations
-
- @Freezed(fromJson: true, toJson: true, copyWith: false)
Constructors
- ReplyMarkup.forceReply({@JsonKey(name: 'force_reply') @Default(true) bool forceReply, @JsonKey(name: 'input_field_placeholder') String? inputFieldPlaceholder, @JsonKey(name: 'selective') bool? selective})
-
Upon receiving a message with this object, Telegram clients will display a
reply interface to the user (act as if the user has selected the bot's
message and tapped 'Reply'). This can be extremely useful if you want to
create user-friendly step-by-step interfaces without having to sacrifice
privacy mode.
constfactory
-
ReplyMarkup.fromJson(Map<
String, dynamic> json) -
Create the Reply Markup from JSON
factory
-
ReplyMarkup.inlineKeyboard({@JsonKey(name: 'inline_keyboard') @Default([<InlineKeyboardButton>[]]) List<
List< inlineKeyboard})InlineKeyboardButton> > -
This object represents an inline keyboard that appears right next to the
message it belongs to.
constfactory
-
ReplyMarkup.keyboard({@JsonKey(name: 'keyboard') required List<
List< keyboard, @JsonKey(name: 'resize_keyboard') bool? resizeKeyboard, @JsonKey(name: 'one_time_keyboard') bool? oneTimeKeyboard, @JsonKey(name: 'input_field_placeholder') String? inputFieldPlaceholder, @JsonKey(name: 'selective') bool? selective, @JsonKey(name: 'is_persistent') bool? isPersistent})KeyboardButton> > -
This object represents a custom keyboard with reply options (see
Introduction to bots for details and examples).
constfactory
- ReplyMarkup.keyboardRemove({@JsonKey(name: 'remove_keyboard') @Default(true) bool removeKeyboard, @JsonKey(name: 'selective') bool? selective})
-
Upon receiving a message with this object, Telegram clients will remove
the current custom keyboard and display the default letter-keyboard.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ReplyMarkup to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
inline(
) → InlineKeyboardMarkup -
Easy way to create an inline keyboard with buttons that can be pressed inline.
This is a shortcut for
InlineKeyboardMarkup