KeyboardButtonRequestUsers class abstract

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

Available extensions
Annotations
  • @freezed

Constructors

KeyboardButtonRequestUsers({@JsonKey.new(name: 'request_id') required int requestId, @JsonKey.new(name: 'user_is_bot') bool? userIsBot, @JsonKey.new(name: 'user_is_premium') bool? userIsPremium, @JsonKey.new(name: 'max_quantity') int? maxQuantity, @JsonKey.new(name: 'request_name') bool? requestName, @JsonKey.new(name: 'request_username') bool? requestUsername, @JsonKey.new(name: 'request_photo') bool? requestPhoto})
Creates a new KeyboardButtonRequestUsers object.
const
factory
KeyboardButtonRequestUsers.fromJson(Map<String, dynamic> json)
Creates a new KeyboardButtonRequestUsers from a JSON object.
factory

Properties

copyWith → $KeyboardButtonRequestUsersCopyWith<KeyboardButtonRequestUsers>
Create a copy of KeyboardButtonRequestUsers with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
maxQuantity int?
Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
no setterinherited
requestId int
Signed 32-bit identifier of the request.
no setterinherited
requestName bool?
Optional. Pass True to request the users' first and last name.
no setterinherited
requestPhoto bool?
Optional. Pass True to request the users' photo.
no setterinherited
requestUsername bool?
Optional. Pass True to request the users' username.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userIsBot bool?
Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
no setterinherited
userIsPremium bool?
Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.
no setterinherited

Methods

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

Available on KeyboardButtonRequestUsers, provided by the KeyboardButtonRequestUsersPatterns extension

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

Available on KeyboardButtonRequestUsers, provided by the KeyboardButtonRequestUsersPatterns extension

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

Available on KeyboardButtonRequestUsers, provided by the KeyboardButtonRequestUsersPatterns 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 KeyboardButtonRequestUsers to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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