Input$AudienceCriteriaInput.fromJson constructor
Input$AudienceCriteriaInput.fromJson(
- Map<String, dynamic> data
)
Implementation
factory Input$AudienceCriteriaInput.fromJson(Map<String, dynamic> data) {
final result$data = <String, dynamic>{};
if (data.containsKey('title')) {
final l$title = data['title'];
result$data['title'] = (l$title as String?);
}
if (data.containsKey('description')) {
final l$description = data['description'];
result$data['description'] = (l$description as String?);
}
if (data.containsKey('icon')) {
final l$icon = data['icon'];
result$data['icon'] = (l$icon as String?);
}
if (data.containsKey('style')) {
final l$style = data['style'];
result$data['style'] = (l$style as String?);
}
if (data.containsKey('enable')) {
final l$enable = data['enable'];
result$data['enable'] = (l$enable as bool?);
}
if (data.containsKey('media')) {
final l$media = data['media'];
result$data['media'] = l$media == null
? null
: Input$MediaInput.fromJson((l$media as Map<String, dynamic>));
}
if (data.containsKey('fields')) {
final l$fields = data['fields'];
result$data['fields'] = (l$fields as List<dynamic>?)
?.map((e) => Input$AudienceCriteriaFieldInput.fromJson(
(e as Map<String, dynamic>)))
.toList();
}
return Input$AudienceCriteriaInput._(result$data);
}