UDownloadConfig class
Download manager settings: connections, concurrency, speed limit, retries, Wi-Fi only, notifications.
Constructors
-
UDownloadConfig({int maxConcurrent = 3, int maxPerHost = 2, int connections = 4, int minSegmentSize = 1024 * 1024, int speedLimit = 0, Duration stallTimeout = const Duration(seconds: 30), bool keepAwake = true, bool resumeOnStart = true, bool encryptQueue = false, UTransportOptions transport = const UTransportOptions(), String notificationIcon = "@mipmap/ic_launcher", String foregroundTitle(List<
UDownloadTask> active)?})
Properties
- connections ↔ int
-
Default parallel connections per task (segments).
getter/setter pair
- encryptQueue ↔ bool
-
Store the queue (URLs, headers) in the encrypted vault instead of plain storage.
getter/setter pair
-
foregroundTitle
↔ String Function(List<
UDownloadTask> active)? -
Title of the Android foreground notification; defaults to the active task's name.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepAwake ↔ bool
-
Keep the process alive and the device awake while downloads run (an Android foreground
service with a progress notification, a power assertion on desktop, a background-task
grant on iOS).
getter/setter pair
- maxConcurrent ↔ int
-
Tasks transferring at once.
getter/setter pair
- maxPerHost ↔ int
-
Tasks transferring from one host at once.
getter/setter pair
- minSegmentSize ↔ int
-
Segments are never split below this many bytes.
getter/setter pair
- notificationIcon ↔ String
-
Android small icon for completion notifications.
getter/setter pair
- resumeOnStart ↔ bool
-
Continue interrupted downloads when UDownloadManager.init runs.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speedLimit ↔ int
-
Global bytes-per-second cap across all tasks; 0 means unlimited.
getter/setter pair
- stallTimeout ↔ Duration
-
A connection that delivers nothing for this long is dropped and retried.
getter/setter pair
- transport ↔ UTransportOptions
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited