year method

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

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

Implementation

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