InlineKeyboard.fromJson constructor

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

Creates an InlineKeyboard from JSON

Implementation

factory InlineKeyboard.fromJson(Map<String, dynamic> json) => InlineKeyboard(
      inlineKeyboard: (json['inline_keyboard'] as List)
          .map(
            (row) => (row as List)
                .map(
                  (button) => InlineKeyboardButton.fromJson(
                    button as Map<String, dynamic>,
                  ),
                )
                .toList(),
          )
          .toList(),
    );