TuningExamples.fromJson constructor

TuningExamples.fromJson(
  1. Object? j
)

Implementation

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