iamriajul / adhan-dart

Adhan for Dart / Muslim Prayer Times Library. Now retrieving Prayer time in Dart easier than ever.
https://pub.dev/packages/adhan
MIT License
87 stars 41 forks source link

[Question] Show Fajr for the next day after Isha #28

Closed vuln3r closed 2 years ago

vuln3r commented 3 years ago

Please follow the general troubleshooting steps first:

Question related to which version: Common

Description

I have a question about Isha prayer exactly after Isha prayer. So once Isha is done I'm getting a none enum case and I want to show Fajr for the next day.. I tried with:

void _getPrayersForTomorrow() { var newDate = new DateTime(nextPrayerTime.value.year, nextPrayerTime.value.month, nextPrayerTime.value.day + 1); nextPrayer.value = prayerTimes.value.nextPrayerByDateTime(newDate); }

but I still get none as praying time... is there any workaround to archive that?

Selam

iamriajul commented 2 years ago

Yes, I've implemented a workaround for this scenario, but that's in Kotlin. You may get ideas from Kotlin codes too. Workaround: https://gist.github.com/iamriajul/2cdbc15d4fd0e8bad203205c9302a54b

vuln3r commented 2 years ago

Oh, thanks for it :) it helps a lot 👍🏻