CallbackQueryPayload.fromJson constructor

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

Implementation

factory CallbackQueryPayload.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case CallbackQueryPayloadData.CONSTRUCTOR:
      return CallbackQueryPayloadData.fromJson(json);
    case CallbackQueryPayloadDataWithPassword.CONSTRUCTOR:
      return CallbackQueryPayloadDataWithPassword.fromJson(json);
    case CallbackQueryPayloadGame.CONSTRUCTOR:
      return CallbackQueryPayloadGame.fromJson(json);
    default:
      return const CallbackQueryPayload();
  }
}