MenuButton class abstract

This object describes the bot's menu button in a private chat. It should be one of MenuButtonCommands, MenuButtonWebApp, or MenuButtonDefault.

If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise, the default menu button is applied. By default, the menu button opens the list of bot commands.

Annotations
  • @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

Describes that no specific value for the menu button was set.
const
factory
Represents a menu button, which opens the bot's list of commands.
const
factory
Creates a new MenuButton object. This method decides which MenuButton subclass to use based on the type field.
factory
Represents a menu button, which launches a Web App.
const
factory

Properties

copyWith → $MenuButtonCopyWith<MenuButton>
Create a copy of MenuButton with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type MenuButtonType
Type of the menu button
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this MenuButton to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited