Campaigns.fromJson constructor

Campaigns.fromJson(
  1. Map<String, Object> json
)

Implementation

Campaigns.fromJson(Map<String, Object> json) {
  visitorId = json['visitorId'] as String;
  // panic = json['panic']

  var list = json['campaigns'] as List<dynamic>;
  campaigns = list.map((e) {
    return Campaign.fromJson(e);
  }).toList();
}