today method
A function that return single prayertime object
This prayertime object contain the prayertime information for today
The zone
should be a Zone object type.
Implementation
Future<PrayerTime> today({required Zone zone}) async {
try {
Map<dynamic, dynamic> decodedResult =
await HttpService.get(zone: zone.code, period: 'today');
return PrayerTime.fromJson(decodedResult['prayerTime'][0]);
} catch (e) {
throw Exception('ESolat Connector error $e');
}
}