Trigger.fromJson constructor
Trigger.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Trigger.fromJson(Map<String, dynamic> json) {
return Trigger(
actions: (json['Actions'] as List?)
?.whereNotNull()
.map((e) => Action.fromJson(e as Map<String, dynamic>))
.toList(),
description: json['Description'] as String?,
id: json['Id'] as String?,
name: json['Name'] as String?,
predicate: json['Predicate'] != null
? Predicate.fromJson(json['Predicate'] as Map<String, dynamic>)
: null,
schedule: json['Schedule'] as String?,
state: (json['State'] as String?)?.toTriggerState(),
type: (json['Type'] as String?)?.toTriggerType(),
workflowName: json['WorkflowName'] as String?,
);
}