AbstractDownloader constructor
AbstractDownloader({
- required String gameDir,
- DownloadProgressCallback? onDownloadProgress,
- OperationProgressCallback? onOperationProgress,
- 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;