KeyboardButtonRequestChat class abstract

This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.

https://core.telegram.org/bots/api#keyboardbuttonrequestchat

Available extensions
Annotations
  • @freezed

Constructors

KeyboardButtonRequestChat({@JsonKey.new(name: 'request_id') required int requestId, @JsonKey.new(name: 'chat_is_channel') required bool chatIsChannel, @JsonKey.new(name: 'chat_is_forum') bool? chatIsForum, @JsonKey.new(name: 'chat_has_username') bool? chatHasUsername, @JsonKey.new(name: 'chat_is_created') bool? chatIsCreated, @JsonKey.new(name: 'user_administrator_rights') ChatAdministratorRights? userAdministratorRights, @JsonKey.new(name: 'bot_administrator_rights') ChatAdministratorRights? botAdministratorRights, @JsonKey.new(name: 'bot_is_member') bool? botIsMember, @JsonKey.new(name: 'request_title') bool? requestTitle, @JsonKey.new(name: 'request_username') bool? requestUsername, @JsonKey.new(name: 'request_photo') bool? requestPhoto})
Creates a new KeyboardButtonRequestChat object.
const
factory
KeyboardButtonRequestChat.fromJson(Map<String, dynamic> json)
Creates a new KeyboardButtonRequestChat from a JSON object.
factory

Properties

botAdministratorRights → ChatAdministratorRights?
Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
no setterinherited
botIsMember → bool?
Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
no setterinherited
chatHasUsername → bool?
Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.
no setterinherited
chatIsChannel → bool
Pass True to request a channel chat, pass False to request a group or a supergroup chat.
no setterinherited
chatIsCreated → bool?
Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
no setterinherited
chatIsForum → bool?
Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.
no setterinherited
copyWith → $KeyboardButtonRequestChatCopyWith<KeyboardButtonRequestChat>
Create a copy of KeyboardButtonRequestChat with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
requestId → int
Signed 32-bit identifier of the request.
no setterinherited
requestPhoto → bool?
Optional. Pass True to request the chat's photo.
no setterinherited
requestTitle → bool?
Optional. Pass True to request the chat's title.
no setterinherited
requestUsername → bool?
Optional. Pass True to request the chat's username.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
userAdministratorRights → ChatAdministratorRights?
Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_KeyboardButtonRequestChat value)) → TResult

Available on KeyboardButtonRequestChat, provided by the KeyboardButtonRequestChatPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_KeyboardButtonRequestChat value)?) → TResult?

Available on KeyboardButtonRequestChat, provided by the KeyboardButtonRequestChatPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_KeyboardButtonRequestChat value)?, {required TResult orElse()}) → TResult

Available on KeyboardButtonRequestChat, provided by the KeyboardButtonRequestChatPatterns extension

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

Operators

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