fromJson static method

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

Implementation

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

  return QuickReplyShortcut(
    id: (json['id'] as int?) ?? 0,
    name: (json['name'] as String?) ?? '',
    firstMessage: QuickReplyMessage.fromJson(
      tdMapFromJson(json['first_message']),
    ),
    messageCount: (json['message_count'] as int?) ?? 0,
  );
}