KeyboardButton.fromJson constructor

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

Parses a KeyboardButton from TDLib JSON.

Implementation

factory KeyboardButton.fromJson(Map<String, dynamic> json) => KeyboardButton(
  text: _readString(json['text']),
  iconCustomEmojiId: _readInt(json['icon_custom_emoji_id']),
  style: _readObject(json['style'], ButtonStyle.fromJson),
  type: _readObject(json['type'], KeyboardButtonType.fromJson),
  extra: json['@extra'],
  clientId: _readClientId(json['@client_id']),
);