nightPortions method
_NightPortions
nightPortions()
Implementation
_NightPortions nightPortions() {
switch (highLatitudeRule) {
case HighLatitudeRule.middle_of_the_night:
{
return _NightPortions(1.0 / 2.0, 1.0 / 2.0);
}
case HighLatitudeRule.seventh_of_the_night:
{
return _NightPortions(1.0 / 7.0, 1.0 / 7.0);
}
case HighLatitudeRule.twilight_angle:
{
if (ishaAngle == null) {
throw FormatException('ishaAngle\'s value isn\'t define');
}
return _NightPortions(fajrAngle / 60.0, ishaAngle! / 60.0);
}
default:
{
throw FormatException('Invalid high latitude rule');
}
}
}