ReplyMarkup.fromJson constructor

ReplyMarkup.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ReplyMarkup.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
      return ReplyMarkupRemoveKeyboard.fromJson(json);
    case ReplyMarkupForceReply.CONSTRUCTOR:
      return ReplyMarkupForceReply.fromJson(json);
    case ReplyMarkupShowKeyboard.CONSTRUCTOR:
      return ReplyMarkupShowKeyboard.fromJson(json);
    case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
      return ReplyMarkupInlineKeyboard.fromJson(json);
    default:
      return const ReplyMarkup();
  }
}