getReports static method

Future<List<TestReport>?> getReports({
  1. required int projectId,
})

Implementation

static Future<List<TestReport>?> getReports({required int projectId}) async {
  final response = await FlutterTestRail.instance.client.request('/get_reports/$projectId', RequestMethod.get);
  final reports= response?['reports'] as List<dynamic>;
  return reports.map((e) => TestReport.fromJson(e)).toList();
}