InputMessagePoll.fromJson constructor

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

Parse from a json

Implementation

factory InputMessagePoll.fromJson(Map<String, dynamic> json) => InputMessagePoll(
  question: json['question'],
  options: List<String>.from((json['options'] ?? []).map((item) => item).toList()),
  isAnonymous: json['is_anonymous'],
  type: PollType.fromJson(json['type']),
  openPeriod: json['open_period'],
  closeDate: json['close_date'],
  isClosed: json['is_closed'],
);