fromJson static method

ReplyMarkupShowKeyboard? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static ReplyMarkupShowKeyboard? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return ReplyMarkupShowKeyboard(
    rows: List<List<KeyboardButton>>.from(
      tdListFromJson(json['rows'])
          .map(
            (item) => List<KeyboardButton>.from(
              tdListFromJson(json['List<KeyboardButton>'])
                  .map((item) => KeyboardButton.fromJson(tdMapFromJson(item)))
                  .whereType<KeyboardButton>(),
            ),
          )
          .whereType<List<KeyboardButton>>(),
    ),
    isPersistent: (json['is_persistent'] as bool?) ?? false,
    resizeKeyboard: (json['resize_keyboard'] as bool?) ?? false,
    oneTime: (json['one_time'] as bool?) ?? false,
    isPersonal: (json['is_personal'] as bool?) ?? false,
    inputFieldPlaceholder: (json['input_field_placeholder'] as String?) ?? '',
  );
}