SponsoredMessage.fromJson constructor

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

Parse from a json

Implementation

factory SponsoredMessage.fromJson(Map<String, dynamic> json) =>
    SponsoredMessage(
      messageId: json['message_id'],
      isRecommended: json['is_recommended'],
      content: MessageContent.fromJson(json['content']),
      sponsor: MessageSponsor.fromJson(json['sponsor']),
      additionalInfo: json['additional_info'],
    );