init method Null safety
Implementation
init() async {
_selectedGraphViewType = GraphViewType.W1;
selectedDateTime = report.targetAt!;
currentStartAt = report.targetAt!.subtract(Duration(days: GraphViewType.W1.subDays));
currentEndAt = report.targetAt!;
selectedAction = report.actions?.first;
memoController.text = report.memo ?? "";
memoController
..addListener(() async {
report.memo = memoController.text;
await ApiService().updateReportMemo(report);
});
}