sendFilePayload method
Returns the payloadID as soon as file transfer has begun
File is received in DOWNLOADS_DIRECTORY and is given a generic name without extension You must also send a bytes payload to send the filename and extension so that receiver can rename the file accordingly Send the payloadID and filename to receiver as bytes payload
Implementation
Future<int> sendFilePayload(String endpointId, String filePath) async {
return await _channel.invokeMethod(
'sendFilePayload',
<String, dynamic>{
'endpointId': endpointId,
'filePath': filePath,
},
);
}