InlineKeyboardButtonType.fromJson constructor

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

Parses whichever InlineKeyboardButtonType subtype the JSON describes.

Implementation

factory InlineKeyboardButtonType.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is InlineKeyboardButtonType
      ? object
      : UndecodedInlineKeyboardButtonType(json);
}