Pipeline.fromJson constructor

Pipeline.fromJson(
  1. Object? j
)

Implementation

factory Pipeline.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Pipeline(
    stages: switch (json['stages']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) Pipeline_Stage.fromJson(i)],
      _ => throw const FormatException('"stages" is not a list'),
    },
  );
}