Bucketing.fromJson constructor
Implementation
Bucketing.fromJson(Map<String, dynamic> json) {
// Set panic
if (json.keys.contains("panic")) {
panic = json['panic'] as bool;
}
// Construct bucketing object
var list = (json['campaigns'] ?? []) as List<dynamic>;
campaigns = list.map((e) {
return BucketCampaign.fromJson(e);
}).toList();
}