Comments (16)
Thank you very much for updating the docs. Please allow my to add the following comments:
- For Qibla, the docs is not clear to me, how to use it. Do you have an example? is this a compass ?
- For the last item which is not clear to you , I mean by adding count down time for the remining time to next preayer like:
Aser after 1:18:23
Sorry to chime in, the count down time should be pretty straightforward, and the library already has timeForPrayer method, which I think sufficient to calculate countdown timer, this is my implementation
Timer(Duration(seconds: 1), () {
var curTime = DateTime.now();
var nextPrayerTime = prayerTime.timeForPrayer(prayerTimes.nextPrayer());
var milisDiff = nextPrayerTime.millisecondsSinceEpoch -
curTime.millisecondsSinceEpoch;
var hourDiff = milisDiff ~/ 3600000;
var minuteDiff = (milisDiff - hourDiff * 3600000) ~/ 60000;
setState(() {
textAdzanRemaining = 'next prayer in $hourDiff hour $minuteDiff minutes';
});```
from adhan-dart.
@alamsz i want to implement same functionality to my app but i don't know how, i copy your code but it cannot work can you show me how to implement it
I've made simple example in https://github.com/lamsz/adzan it is deployed in https://adzan.lamsz.id/#/ hopefully could help you @muzohaib763
from adhan-dart.
Just updated the doc, for SunnahTimes and Qibla.
from adhan-dart.
2- can you please add the time of mid-night (calculated as the mean time from sunset to fajr)
3- can you please add the start time of the last third of the night.
(duration between sunset and fajr / 3 = i) (i + i + sunset time = start time of the last third of the night)
for these two please check SunnahTimes
from adhan-dart.
1- if the current preayer is showing as (Prayer.isha) then the next Prayer is showing (Prayer.none). it should show (Prayer.fajr).
giving next prayer fajr at a date-changing point (24 hours a day) will be complicated to handle, and it will make complexity as there will be two fajr in the same PrayerTimes instance, which will be confusing. so handle the Prayer.none case with your own application's needs and logic.
from adhan-dart.
2- if the time is now is after the Sunrise time, it shows (Prayer.sunrise). there is not prayer as sunrise.
Yes, there is!. there is a prayer called Ishraq.
The time for the Ishraq prayer begins fifteen to twenty minutes after sunrise and consists of two Raka'ahs. ... According to majority of scholars of Hadith and Fiqh, Duha Prayer and Al-Ishraq Prayer are all names of the same salah (ritual prayer).
from adhan-dart.
1- can you please add (next prayer) is after ....... (count down time)
this is not clear to me.
from adhan-dart.
Thank you very much for updating the docs. Please allow my to add the following comments:
- For Qibla, the docs is not clear to me, how to use it. Do you have an example? is this a compass ?
- For the last item which is not clear to you , I mean by adding count down time for the remining time to next preayer like:
Aser after 1:18:23
from adhan-dart.
Thank you very much for updating the docs. Please allow my to add the following comments:
- For Qibla, the docs is not clear to me, how to use it. Do you have an example? is this a compass ?
- For the last item which is not clear to you , I mean by adding count down time for the remining time to next preayer like:
Aser after 1:18:23Sorry to chime in, the count down time should be pretty straightforward, and the library already has timeForPrayer method, which I think sufficient to calculate countdown timer, this is my implementation
Timer(Duration(seconds: 1), () { var curTime = DateTime.now(); var nextPrayerTime = prayerTime.timeForPrayer(prayerTimes.nextPrayer()); var milisDiff = nextPrayerTime.millisecondsSinceEpoch - curTime.millisecondsSinceEpoch; var hourDiff = milisDiff ~/ 3600000; var minuteDiff = (milisDiff - hourDiff * 3600000) ~/ 60000; setState(() { textAdzanRemaining = 'next prayer in $hourDiff hour $minuteDiff minutes'; });```
this is not a flutter specific flutter library, it's a dart library, so it should be usable everywhere. please try to understand, everything can't be pushed into the library.
the library follows the Adhan project.
from adhan-dart.
Thank you very much for updating the docs. Please allow my to add the following comments:
- For Qibla, the docs is not clear to me, how to use it. Do you have an example? is this a compass ?
- For the last item which is not clear to you , I mean by adding count down time for the remining time to next preayer like:
Aser after 1:18:23Sorry to chime in, the count down time should be pretty straightforward, and the library already has timeForPrayer method, which I think sufficient to calculate countdown timer, this is my implementation
Timer(Duration(seconds: 1), () { var curTime = DateTime.now(); var nextPrayerTime = prayerTime.timeForPrayer(prayerTimes.nextPrayer()); var milisDiff = nextPrayerTime.millisecondsSinceEpoch - curTime.millisecondsSinceEpoch; var hourDiff = milisDiff ~/ 3600000; var minuteDiff = (milisDiff - hourDiff * 3600000) ~/ 60000; setState(() { textAdzanRemaining = 'next prayer in $hourDiff hour $minuteDiff minutes'; });```
this is not a flutter specific flutter library, it's a dart library, so it should be usable everywhere. please try to understand, everything can't be pushed into the library.
the library follows the Adhan project.
Agree, I only point out that the library has sufficient method for dev to be able to implement it in flutter, and only giving example. My apologies if my comment causing confusion
from adhan-dart.
@alamsz i want to implement same functionality to my app but i don't know how, i copy your code but it cannot work can you show me how to implement it
from adhan-dart.
@alamsz
thanks for the code. but there is an issue, it does not work if the next prayer is Fajr.
from adhan-dart.
@alamsz
thanks for the code. but there is an issue, it does not work if the next prayer is Fajr.
did you solve the problem
from adhan-dart.
@alamsz
thanks for the code. but there is an issue, it does not work if the next prayer is Fajr.did you solve the problem
Let me write the solution I found for those who come to this issue. below snippet will solve your problem.
var newDate = DateTime(
nextPrayerTime.year,
nextPrayerTime.month,
nextPrayerTime.day + 1, //we mark the next day
nextPrayerTime.hour,
nextPrayerTime.minute ,
nextPrayerTime.second,
nextPrayerTime.microsecond,
);
debugPrint(newDate.millisecondsSinceEpoch.toString());
from adhan-dart.
@alamsz
thanks for the code. but there is an issue, it does not work if the next prayer is Fajr.did you solve the problem
it's not an issue actually, since the library regards Fajr in the next day, you only need to get the next day first prayer if it is none.
other alternative, you could give intermediate placeholder such as waiting for midnight, since after midnight next prayer will show fajr
from adhan-dart.
Here's my Kotlin version of Running & Next Prayer determination, this might help you write your own dart code: https://gist.github.com/2cdbc15d4fd0e8bad203205c9302a54b
Thanks.
from adhan-dart.
Related Issues (20)
- How to get offset of a country. because when we pass offset it give correct time for manual lat lng. if we did not pass offset for manual lat lng it give wrong timings. also clarify that offset is necessary for manual location. HOT 2
- How to use Method HOT 1
- Next Prayer by Time Nor Working
- [Feature] London central mosque time needed HOT 1
- Question: Null Safety Support? HOT 2
- [Question] HOT 1
- 'sunset' time [Question] HOT 2
- latitude more than 65: Error value should not be infinite or NaN HOT 4
- Prayer timing is not correct for palestine[Bug]
- [Question]
- IQAMAH Time? HOT 1
- FormatException ishaAngle's value isn't define[Bug]
- LateInitializationError: Field 'prayerTimes' has not been initialized. HOT 9
- Exception with prayer times [Bug] HOT 7
- Issue in the asr at Calculation Method.turkey HOT 2
- [Bug] Update the package to support Dart 3 HOT 3
- Midnight calculation HOT 1
- Please add for the country of Iraq
- Adhan package Return wrong time on different timezone HOT 2
- Can we automize the calculation parameters? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adhan-dart.