fromJson static method
Inherited by: KeyboardButtonTypeRequestChat KeyboardButtonTypeRequestLocation KeyboardButtonTypeRequestManagedBot KeyboardButtonTypeRequestPhoneNumber KeyboardButtonTypeRequestPoll KeyboardButtonTypeRequestUsers KeyboardButtonTypeText KeyboardButtonTypeWebApp
Implementation
static KeyboardButtonTypeRequestUsers? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return KeyboardButtonTypeRequestUsers(
id: (json['id'] as int?) ?? 0,
restrictUserIsBot: (json['restrict_user_is_bot'] as bool?) ?? false,
userIsBot: (json['user_is_bot'] as bool?) ?? false,
restrictUserIsPremium:
(json['restrict_user_is_premium'] as bool?) ?? false,
userIsPremium: (json['user_is_premium'] as bool?) ?? false,
maxQuantity: (json['max_quantity'] as int?) ?? 0,
requestName: (json['request_name'] as bool?) ?? false,
requestUsername: (json['request_username'] as bool?) ?? false,
requestPhoto: (json['request_photo'] as bool?) ?? false,
);
}