isHoursOfDarkness property

bool isHoursOfDarkness

Gets if it is hours of darkness based on the civil twilight.

Hours of darkness are defined as being between the end of the evening civil twilight and the begining of the morning civil twilight.

Implementation

bool get isHoursOfDarkness {
  final solarZenith = 90 - sunHorizontalPosition.elevation;
  return (solarZenith > 96.0);
}