InputMessagePoll.fromJson constructor

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

Parses a InputMessagePoll from TDLib JSON.

Implementation

factory InputMessagePoll.fromJson(Map<String, dynamic> json) =>
    InputMessagePoll(
      question: _readString(json['question']),
      options: _readList<String>(json['options'], _readString),
      isAnonymous: _readBool(json['is_anonymous']),
      type: _readObject(json['type'], PollType.fromJson),
      openPeriod: _readInt(json['open_period']),
      closeDate: _readInt(json['close_date']),
      isClosed: _readBool(json['is_closed']),
    );