duration method
A function that return specific range prayertime days
The zone
should be a Zone object type.
The dateend
should have a format 'YYYY-MM-DD'.
The datestart
should have a format 'YYYY-MM-DD'.
Implementation
Future<List<PrayerTime>> duration(
{required Zone zone,
required String datestart,
required String dateend}) async {
try {
Map<dynamic, dynamic> decodedResult = await HttpService.post(
zone: zone.code, datestart: datestart, dateend: dateend);
return PrayerTime.getListFromJson(decodedResult);
} catch (e) {
throw Exception('ESolat Connector error $e');
}
}