ReplyKeyboardMarkup.fromJson constructor

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

Constructs a ReplyKeyboardMarkup object from a json String

Implementation

factory ReplyKeyboardMarkup.fromJson(Map<String, dynamic> json) {
  return ReplyKeyboardMarkup(
    keyboard: List<List<KeyboardButton>>.from(
      json['keyboard'].map(
        (x) => List<KeyboardButton>.from(
          x.map((x) => KeyboardButton.fromJson(x)),
        ),
      ),
    ),
    resizeKeyboard: json['resize_keyboard'],
    oneTimeKeyboard: json['one_time_keyboard'],
    inputFieldPlaceholder: json['input_field_placeholder'],
    selective: json['selective'],
    isPersistent: json['is_persistent'],
  );
}