InlineKeyboardMarkup.fromJson constructor

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

Creates an InlineKeyboardMarkup object from JSON object

Implementation

factory InlineKeyboardMarkup.fromJson(Map<String, dynamic> json) {
  return InlineKeyboardMarkup(
    inlineKeyboard: (json['inline_keyboard'] as List<dynamic>)
        .map(
          (e) => (e as List)
              .map((e) => InlineKeyboardButton.fromJson(e))
              .toList(),
        )
        .toList(),
  );
}