Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception with prayer times [Bug] #46

Open
k0T0z opened this issue Dec 5, 2022 · 7 comments
Open

Exception with prayer times [Bug] #46

k0T0z opened this issue Dec 5, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@k0T0z
Copy link

k0T0z commented Dec 5, 2022

======== Exception caught by widgets library =======================================================
The following FormatException was thrown building HomeContentPrayerTimeItem(dirty):
ishaAngle's value isn't define

Describe the bug
when choosing "umm alqura uni, mekka" as a calculation method with "hanafi" as a madhab and "based on angle" as a high latitude rule the plugin returns an exception, this isn't supposed to happen.

To Reproduce
Steps to reproduce the behavior:

  1. Try to read prayer times after setting calculation parameters as shown above.

Expected behavior
The plugin must not return this exception

Screenshots
image
image

Environment(please complete the following information):

  • Dart Language Version: 2.18.5
  • Flutter Version: 3.3.9
  • Adhan-Dart Version: 2.0.0-nullsafety.2
@k0T0z k0T0z added the bug Something isn't working label Dec 5, 2022
@k0T0z
Copy link
Author

k0T0z commented Jan 26, 2023

@iamriajul @KarimMohamed20 ?

@JMApps
Copy link

JMApps commented Jan 31, 2023

Снимок экрана 2023-01-31 в 07 50 28

@saifkandil Works fine for me when selecting Mecca with prayer time calculation Umm al-Qura. You may not be initializing everything in the correct sequence

@k0T0z
Copy link
Author

k0T0z commented Jan 31, 2023

@JMApps the problem is not with selecting "umm alqura uni, mekka" alone try to select it with other parameters I specified above, please

@JMApps
Copy link

JMApps commented Jan 31, 2023

@saifkandil Works fine for me and doesn't throw any exception, Hanafi method for asr prayer is selected in the screenshot and Umm al-Qura for prayer times. But I didn't understand "based on angle".

@k0T0z
Copy link
Author

k0T0z commented Jan 31, 2023

@JMApps Sorry I didn't clarify it at first it's twilight angle for high latitude rule (I use it as Based on angle so that user can understand it)

/// Rules for dealing with Fajr and Isha at places with high latitudes
enum HighLatitudeRule {
  /// Fajr will never be earlier than the middle of the night, and Isha will never be later than
  /// the middle of the night.
  middle_of_the_night,

  /// Fajr will never be earlier than the beginning of the last seventh of the night, and Isha will
  /// never be later than the end of hte first seventh of the night.
  seventh_of_the_night,

  /// Similar to [HighLatitudeRule.seventh_of_the_night], but instead of 1/7th, the faction
  /// of the night used is fajrAngle / 60 and ishaAngle/60.
  twilight_angle
}

In short, steps to reproduce is: set your High latitude rule -> twilight_angle
Calculation method -> Umm Al-qura University, Makkah
Madhab -> Hanafi

@k0T0z
Copy link
Author

k0T0z commented May 19, 2023

did you managed to reproduce it? @JMApps

@JMApps
Copy link

JMApps commented Nov 20, 2023

Yes bro @k0T0z , I apologize for the late response. I reproduced it, you need to initialize: twilight_angle at the very end:

_prayerTimes = PrayerTimes.today(
  _coordinates,
  _prayerParams,
  utcOffset: AppStyles.calculationUtcOffset[timeOffsetIndex],
);

_sunnahTimes = SunnahTimes(_prayerTimes);
_qibla = Qibla(_coordinates);
_prayerParams.highLatitudeRule = HighLatitudeRule.twilight_angle;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants