yearModelForYear method

XBCalendarYear? yearModelForYear(
  1. int year
)

Implementation

XBCalendarYear? yearModelForYear(int year) {
  if (_yearModelForYearMap[year] != null) {
    return _yearModelForYearMap[year]!;
  }
  for (var element in years.values) {
    if (element.year == year) {
      _yearModelForYearMap[year] = element;
      return element;
    }
  }
  return null;
}