ProgramRule.fromJson constructor
ProgramRule.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ProgramRule.fromJson(Map<String, dynamic> json) {
return ProgramRule(
id: json['id'],
name: json['name'],
description: json['description'],
condition: json['condition'],
program: json['program'],
programRuleActions: List<dynamic>.from(json['programRuleActions'] ?? [])
.map((programRuleAction) => ProgramRuleAction.fromJson({
...programRuleAction,
'programRule': json['id'],
'dirty': false
}))
.toList(),
dirty: json['dirty']);
}