TestResults.fromJson constructor

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

Implementation

factory TestResults.fromJson(Map<String, dynamic> json) {
  final results = json['results']
      ?.map((r) => TestResult.fromJson(r))
      .toList()
      .cast<TestResult>();

  return TestResults(
    limit: json['limit'],
    links: Links.fromJson(json['_links']),
    offset: json['offset'],
    results: results,
    size: json['size'],
  );
}