fromJson static method
Inherited by: KeyboardButtonTypeRequestChat KeyboardButtonTypeRequestLocation KeyboardButtonTypeRequestManagedBot KeyboardButtonTypeRequestPhoneNumber KeyboardButtonTypeRequestPoll KeyboardButtonTypeRequestUsers KeyboardButtonTypeText KeyboardButtonTypeWebApp
Implementation
static KeyboardButtonType? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case KeyboardButtonTypeRequestChat.constructor:
return KeyboardButtonTypeRequestChat.fromJson(json);
case KeyboardButtonTypeRequestLocation.constructor:
return KeyboardButtonTypeRequestLocation.fromJson(json);
case KeyboardButtonTypeRequestManagedBot.constructor:
return KeyboardButtonTypeRequestManagedBot.fromJson(json);
case KeyboardButtonTypeRequestPhoneNumber.constructor:
return KeyboardButtonTypeRequestPhoneNumber.fromJson(json);
case KeyboardButtonTypeRequestPoll.constructor:
return KeyboardButtonTypeRequestPoll.fromJson(json);
case KeyboardButtonTypeRequestUsers.constructor:
return KeyboardButtonTypeRequestUsers.fromJson(json);
case KeyboardButtonTypeText.constructor:
return KeyboardButtonTypeText.fromJson(json);
case KeyboardButtonTypeWebApp.constructor:
return KeyboardButtonTypeWebApp.fromJson(json);
default:
return null;
}
}