UpdatePollAnswer.fromJson constructor

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

Parse from a json

Implementation

factory UpdatePollAnswer.fromJson(Map<String, dynamic> json) =>
    UpdatePollAnswer(
      pollId: int.parse(json['poll_id']),
      voterId: MessageSender.fromJson(json['voter_id']),
      optionIds: List<int>.from(
          (json['option_ids'] ?? []).map((item) => item).toList()),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );