StoryPollComponent.fromJson constructor

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

Implementation

factory StoryPollComponent.fromJson(Map<String, dynamic> json) {
  return StoryPollComponent(
    type: json['type'],
    id: json['id'],
    options: List<String>.from(json['options'].map((x) => x)),
    customPayload: json['customPayload'],
    selectedOptionIndex: json['selectedOptionIndex'],
    title: json['title'],
  );
}