init method Null safety

void init()

Implementation

void init() {
  _fetchGraphDataSub?.cancel();
  _fetchTodayYesterdayDataSub?.cancel();
  _selectedAction = ActionType.lactation;
  selectedDateTime = Helper().convertDateTimeToMidnight(DateTime.now());
  // _prevSelectedGraphViewType = null;
  // _selectedGraphViewType = GraphViewType.W1;
  _selectedGraphViewType = GraphViewType.W1;
  _selectedGraphAvgType = GraphAvgType.TOTAL;
  currentStartAt = selectedDateTime.subtract(Duration(days: _selectedGraphViewType.subDays));
  currentEndAt = selectedDateTime;
  _barItemsDay = null;
  _todayValues = INIT_TODAY_YESTERDAY_VALUES;
  _yesterdayValues = INIT_TODAY_YESTERDAY_VALUES;
  todayCowData = null;
  yesterdayCowData = null;
  _isLoading = true;
}