Skip to content

Commit

Permalink
Add settings to example
Browse files Browse the repository at this point in the history
  • Loading branch information
AminBhst committed Dec 8, 2024
1 parent 275778c commit 14e4e38
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions example/brisk_engine_example.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';

import 'package:brisk_engine/brisk_engine.dart';

void main() async {
Expand All @@ -9,6 +11,15 @@ void main() async {
"https://github.com/AminBhst/brisk-engine/archive/refs/heads/main.zip";
final downloadItem = await HttpDownloadEngine.buildDownloadItem(url);

final settings = DownloadSettings(
baseSaveDir: Directory("YOUR_BASE_DIRECTORY"),
totalConnections: 8,
loggerEnabled: false,
baseTempDir: Directory("YOUR_BASE_DIRECTORY"),
connectionRetryTimeoutMillis: 10000,
maxConnectionRetryCount: -1, // Currently doesn't work
);

/// Start the engine
DownloadEngine.start(
downloadItem,
Expand Down

0 comments on commit 14e4e38

Please sign in to comment.