Transition.fromJson constructor

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

Implementation

factory Transition.fromJson(Map<String, Object?> json) {
  return Transition(
    description: json[r'description'] as String? ?? '',
    from: (json[r'from'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    id: json[r'id'] as String? ?? '',
    name: json[r'name'] as String? ?? '',
    properties: json[r'properties'] as Map<String, Object?>?,
    rules: json[r'rules'] != null
        ? WorkflowRules.fromJson(json[r'rules']! as Map<String, Object?>)
        : null,
    screen: json[r'screen'] != null
        ? TransitionScreenDetails.fromJson(
            json[r'screen']! as Map<String, Object?>)
        : null,
    to: json[r'to'] as String? ?? '',
    type: TransitionType.fromValue(json[r'type'] as String? ?? ''),
  );
}