fromJson static method

WorkflowTransition? fromJson(
  1. Map<String, dynamic>? json
)

Returns a new WorkflowTransition instance and imports its values from json if it's non-null, null if json is null.

Implementation

static WorkflowTransition? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return WorkflowTransition(
    fields:
        json[r'fields'] == null ? null : List<String>.from(json[r'fields']),
    description: json[r'description'],
    from: WorkflowState.fromJson(json[r'from']),
    id: json[r'id'],
    name: json[r'name'],
    required_: json[r'required'] == null
        ? null
        : List<String>.from(json[r'required']),
    to: WorkflowState.fromJson(json[r'to']),
    type: json[r'type'],
  );
}