week method

Future<List<PrayerTime>> week({
  1. required Zone zone,
})

A function that return a list prayertime object This list prayertime object contain the prayertime information for this week The zone should be a Zone object type.

Implementation

Future<List<PrayerTime>> week({required Zone zone}) async {
  try {
    Map<dynamic, dynamic> decodedResult =
        await HttpService.get(zone: zone.code, period: 'week');
    return PrayerTime.getListFromJson(decodedResult);
  } catch (e) {
    throw Exception('ESolat Connector error $e');
  }
}