cancelTask method
Cancels an ongoing transfer task.
taskId The ID of the task to cancel.
Returns true if the task was successfully cancelled, false otherwise.
Implementation
@override
Future<bool> cancelTask(String taskId) async {
try {
return await _channel.invokeMethod('cancelTask', {
'task_id': taskId,
}) ??
false;
} on PlatformException {
return false;
}
}