-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Muhammad Umer Farooq <[email protected]>
- Loading branch information
Showing
4 changed files
with
70 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:prayer_time/prayer_time.dart'; | ||
import 'package:prayer_time_app/utils.dart'; | ||
|
||
class PrayerTimes { | ||
final int method; | ||
final double latitude; | ||
final double longitude; | ||
|
||
PrayerTimes({required this.method, required this.latitude, required this.longitude}); | ||
|
||
List<String> getTimes(DateTime date) { | ||
PrayTime prayerTime = PrayTime(method: method); | ||
var times = prayerTime.getPrayerTimes({ | ||
"year": date.year, | ||
"mon": date.month, | ||
"mday": date.day, | ||
}, latitude, longitude, parseTimeZoneOffset(date.timeZoneOffset)); | ||
|
||
// remove 6th index from the list, because it is not required. | ||
times.removeAt(5); | ||
return times; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters