AbstractDownloader constructor

AbstractDownloader({
  1. required String gameDir,
  2. DownloadProgressCallback? onDownloadProgress,
  3. OperationProgressCallback? onOperationProgress,
  4. int progressReportRate = 10,
})

Creates a new downloader instance.

gameDir The base directory where all game files will be stored.

onDownloadProgress Optional callback for reporting file download progress.

onOperationProgress Optional callback for reporting batch operation progress.

progressReportRate How often to report progress, defaults to every 10%.

Implementation

AbstractDownloader({
  required String gameDir,
  DownloadProgressCallback? onDownloadProgress,
  OperationProgressCallback? onOperationProgress,
  int progressReportRate = 10,
}) : _gameDir = gameDir,
     _onDownloadProgress = onDownloadProgress,
     _onOperationProgress = onOperationProgress,
     _progressReportRate = progressReportRate;