getInProgressFileTransfers method

Future<List<FileTransfer>> getInProgressFileTransfers()

Retrieve a List of on progress FileTransfer

Use this method when you want to fetch pending FileTransfers

Implementation

Future<List<FileTransfer>> getInProgressFileTransfers() {
  return channel
      .invokeMethod("getOnProgressFileTransfers")
      .then((transfersJson) {
    return (transfersJson as List? ?? []).map((transferJson) {
      return _mapIdAndConvertFileTransfer(transferJson.map<String, dynamic>(
          (key, value) => MapEntry(key.toString(), value)));
    }).toList();
  });
}