download static method

Future<DownloaderCore> download(
  1. String url,
  2. DownloaderUtils options
)

Start a new Download progress. Returns a DownloaderCore

Implementation

static Future<DownloaderCore> download(
    String url, DownloaderUtils options) async {
  try {
    // ignore: cancel_subscriptions
    // final subscription = await initDownload(url, options);
    final subscription =
        await initDownload(url, options);
    return DownloaderCore(subscription, options, url);
  } catch (e) {
    rethrow;
  }
}