Execution.fromJson constructor
Execution.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Execution.fromJson(Map<String, dynamic> json) {
return Execution(
id: json['id']?.toString() ?? '',
data: json['data'] != null ? Map<String, dynamic>.from(json['data']) : null,
finished: json['finished'] ?? false,
mode: json['mode'] ?? '',
status: _parseStatus(json['status']),
retryOf: json['retryOf']?.toString(),
retrySuccessId: json['retrySuccessId']?.toString(),
startedAt: json['startedAt'] != null ? DateTime.parse(json['startedAt']) : null,
stoppedAt: json['stoppedAt'] != null ? DateTime.parse(json['stoppedAt']) : null,
workflowId: json['workflowId']?.toString() ?? '',
waitTill: json['waitTill'] != null ? DateTime.parse(json['waitTill']) : null,
customData: json['customData'] != null
? Map<String, dynamic>.from(json['customData'])
: null,
workflowName: json['workflowName'],
);
}