CreateWorkflowDetails.fromJson constructor

CreateWorkflowDetails.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory CreateWorkflowDetails.fromJson(Map<String, Object?> json) {
  return CreateWorkflowDetails(
    description: json[r'description'] as String?,
    name: json[r'name'] as String? ?? '',
    statuses: (json[r'statuses'] as List<Object?>?)
            ?.map((i) => CreateWorkflowStatusDetails.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    transitions: (json[r'transitions'] as List<Object?>?)
            ?.map((i) => CreateWorkflowTransitionDetails.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}