KeyboardButtonType.fromJson constructor
a KeyboardButtonType return type can be :
Implementation
factory KeyboardButtonType.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case KeyboardButtonTypeText.CONSTRUCTOR:
return KeyboardButtonTypeText.fromJson(json);
case KeyboardButtonTypeRequestPhoneNumber.CONSTRUCTOR:
return KeyboardButtonTypeRequestPhoneNumber.fromJson(json);
case KeyboardButtonTypeRequestLocation.CONSTRUCTOR:
return KeyboardButtonTypeRequestLocation.fromJson(json);
case KeyboardButtonTypeRequestPoll.CONSTRUCTOR:
return KeyboardButtonTypeRequestPoll.fromJson(json);
default:
return const KeyboardButtonType();
}
}