download method

void download({
  1. String? url,
  2. File? file,
  3. void onReceiveProgress(
    1. int received,
    2. int total,
    3. bool failed
    )?,
  4. void onDone()?,
})

Implementation

void download({
  String? url,
  File? file,
  void Function(int received, int total, bool failed)? onReceiveProgress,
  void Function()? onDone,
}) {
  if (status == UpgradeStatus.loadingLocalConfig || status == UpgradeStatus.dismissed) return;
  if (installer == null || !installer!.hasDownload()) return;
  installer?.download(
    url: url,
    file: file,
    onReceiveProgress: onReceiveProgress,
    onDone: onDone,
  );
}