fromMap static method

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

Construct from Map.

Implementation

static KeyboardButtonType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'keyboardButtonTypeText':
      return KeyboardButtonTypeText.fromMap(_map);
    case 'keyboardButtonTypeRequestUser':
      return KeyboardButtonTypeRequestUser.fromMap(_map);
    case 'keyboardButtonTypeWebApp':
      return KeyboardButtonTypeWebApp.fromMap(_map);
    case 'keyboardButtonTypeRequestChat':
      return KeyboardButtonTypeRequestChat.fromMap(_map);
    case 'keyboardButtonTypeRequestPhoneNumber':
      return KeyboardButtonTypeRequestPhoneNumber.fromMap(_map);
    case 'keyboardButtonTypeRequestLocation':
      return KeyboardButtonTypeRequestLocation.fromMap(_map);
    case 'keyboardButtonTypeRequestPoll':
      return KeyboardButtonTypeRequestPoll.fromMap(_map);
    case null:
    default:
      return null;
  }
}