LunarTime.fromYmdHms constructor Null safety

LunarTime.fromYmdHms(
  1. int lunarYear,
  2. int lunarMonth,
  3. int lunarDay,
  4. int hour,
  5. int minute,
  6. int second
)

Implementation

LunarTime.fromYmdHms(int lunarYear, int lunarMonth, int lunarDay, int hour,
    int minute, int second) {
  _lunar =
      Lunar.fromYmdHms(lunarYear, lunarMonth, lunarDay, hour, minute, second);
  _zhiIndex = LunarUtil.getTimeZhiIndex(
      '${hour < 10 ? '0' : ''}$hour:${minute < 10 ? '0' : ''}$minute');
  _ganIndex = (_lunar!.getDayGanIndexExact() % 5 * 2 + _zhiIndex) % 10;
}