fetchReportTitles method Null safety

Future<void> fetchReportTitles()

리포트타이틀을 모두 가져옵니다.

Implementation

Future<void> fetchReportTitles() async {
  LogManager().addLog("fetchReports", screen: runtimeType.toString());
  try {
    final List<dynamic> body = await reqGET(path: '/api/reports/titles');
    final List<ReportTitle> reportTitles = body.map((element) => ReportTitle.fromJson(element)).toList();
    this.reportTitles = reportTitles;
  } catch (e) {
    LogManager().addLog("fetchReports call failed: $e", screen: runtimeType.toString());
  }
}