fromMap static method

KeyboardButtonTypeRequestUser? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static KeyboardButtonTypeRequestUser? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var id = _map['id']! as int;
  var restrict_user_is_bot = _map['restrict_user_is_bot']! as bool;
  var user_is_bot = _map['user_is_bot']! as bool;
  var restrict_user_is_premium = _map['restrict_user_is_premium']! as bool;
  var user_is_premium = _map['user_is_premium']! as bool;
  return KeyboardButtonTypeRequestUser(
    extra: extra,
    clientId: clientId,
    id: id,
    restrict_user_is_bot: restrict_user_is_bot,
    user_is_bot: user_is_bot,
    restrict_user_is_premium: restrict_user_is_premium,
    user_is_premium: user_is_premium,
  );
}