SponsoredMessages.fromJson constructor

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

Parse from a json

Implementation

factory SponsoredMessages.fromJson(Map<String, dynamic> json) =>
    SponsoredMessages(
      messages: List<SponsoredMessage>.from((json['messages'] ?? [])
          .map((item) => SponsoredMessage.fromJson(item))
          .toList()),
      messagesBetween: json['messages_between'],
      extra: json['@extra'],
      clientId: json['@client_id'],
    );