fromMap static method

ReplyMarkupInlineKeyboard? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static ReplyMarkupInlineKeyboard? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var rows = List<List<InlineKeyboardButton>>.from(
    (_map["rows"] ?? []).map(
      (e) => List<InlineKeyboardButton>.from(
        (e ?? []).map(
          (e) => InlineKeyboardButton.fromMap(e),
        ),
      ),
    ),
  );
  return ReplyMarkupInlineKeyboard(
    extra: extra,
    clientId: clientId,
    rows: rows,
  );
}