Chat / Flutter
Chat Flutter v3
Chat Flutter
Chat
Flutter
Version 3
Home
/
Chat
/
Flutter
/
Message

Track file upload progress using a handler

If needed, you can track the file upload progress by passing the function as an argument to a parameter when calling the sendFileMessage() method.

try {
    final preMessage = channel.sendFileMessage(
        fileMessageparams,
        progress: (bytesSent, totalBytesSent) {
            // You can view how much of the file has been uploaded to the server.
        },
        onCompleted: (msg, err) {
            // A file message has been successfully sent.
        });
}