UpdateChatDraftMessage.fromJson constructor

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

Parse from a json

Implementation

factory UpdateChatDraftMessage.fromJson(Map<String, dynamic> json) =>
    UpdateChatDraftMessage(
      chatId: json['chat_id'],
      draftMessage: json['draft_message'] == null
          ? null
          : DraftMessage.fromJson(json['draft_message']),
      positions: List<ChatPosition>.from((json['positions'] ?? [])
          .map((item) => ChatPosition.fromJson(item))
          .toList()),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );