downloadPlans method

Iterable<Iterable<DownloadingPage>> downloadPlans(
  1. Iterable<Item> timetables, {
  2. bool downloadPreviews = false,
})

Implementation

Iterable<Iterable<DownloadingPage>> downloadPlans(
  Iterable<dsb.Item> timetables, {
  bool downloadPreviews = false,
}) =>
    timetables.map((p) => p.childs).map<Iterable<DownloadingPage>>((p) => p
        .where((x) => x.conType == 6)
        .map((p) => DownloadingPage(
            p.detail,
            p.preview,
            http.get(p.detail,
                ttl: Duration(days: 4), defaultCharset: String.fromCharCodes),
            downloadPreviews
                ? http.getBin('$previewEndpoint/${p.preview}')
                : null)));