configureQueue method
Configure the transfer queue behavior
isEnabled - When true, transfers will be queued and processed according to maxConcurrent.
When false, transfers will start immediately without queueing.
maxConcurrent - The maximum number of concurrent transfers allowed when queue is enabled.
Default is 1, which processes transfers serially.
Implementation
@override
Future<void> configureQueue({
required bool isEnabled,
int maxConcurrent = 1,
double cleanupDelay = 0,
}) async {
try {
// Convert cleanupDelay from milliseconds to seconds for iOS
await _channel.invokeMethod('configureQueue', {
'isEnabled': isEnabled,
'maxConcurrent': maxConcurrent,
'cleanupDelay': cleanupDelay / 1000.0, // Convert ms to seconds
});
} on PlatformException catch (e) {
throw Exception("Failed to configure queue: ${e.message}");
}
}