uploadComplete -> uploadProgress
This commit is contained in:
parent
c0618458fa
commit
af0ca0932f
@ -82,7 +82,7 @@ public class OnUploadFileListener implements UploadFileCallback {
|
|||||||
values.put("fileSize", fileSize);
|
values.put("fileSize", fileSize);
|
||||||
values.put("streamSize", streamSize);
|
values.put("streamSize", streamSize);
|
||||||
values.put("storageSize", storageSize);
|
values.put("storageSize", storageSize);
|
||||||
CommonUtil.emitEvent("uploadFileListener", "uploadComplete", values);
|
CommonUtil.emitEvent("uploadFileListener", "uploadProgress", values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ class OnUploadFileListener {
|
|||||||
Function(String id, int size)? onOpen;
|
Function(String id, int size)? onOpen;
|
||||||
Function(String id, int partSize, int num)? onPartSize;
|
Function(String id, int partSize, int num)? onPartSize;
|
||||||
Function(String id, int fileSize, int streamSize, int storageSize)?
|
Function(String id, int fileSize, int streamSize, int storageSize)?
|
||||||
onUploadComplete;
|
onUploadProgress;
|
||||||
Function(String id, String uploadID)? onUploadID;
|
Function(String id, String uploadID)? onUploadID;
|
||||||
Function(String id, int index, int partSize, String partHash)?
|
Function(String id, int index, int partSize, String partHash)?
|
||||||
onUploadPartComplete;
|
onUploadPartComplete;
|
||||||
@ -30,9 +30,9 @@ class OnUploadFileListener {
|
|||||||
onPartSize?.call(id, partSize, num);
|
onPartSize?.call(id, partSize, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uploadComplete(
|
void uploadProgress(
|
||||||
String id, int fileSize, int streamSize, int storageSize) {
|
String id, int fileSize, int streamSize, int storageSize) {
|
||||||
onUploadComplete?.call(id, fileSize, streamSize, storageSize);
|
onUploadProgress?.call(id, fileSize, streamSize, storageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uploadID(String id, String uploadID) {
|
void uploadID(String id, String uploadID) {
|
||||||
|
@ -3,7 +3,6 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
import 'package:flutter_openim_sdk/src/listener/upload_file_listener.dart';
|
|
||||||
import 'package:flutter_openim_sdk/src/logger.dart';
|
import 'package:flutter_openim_sdk/src/logger.dart';
|
||||||
|
|
||||||
class IMManager {
|
class IMManager {
|
||||||
@ -352,12 +351,12 @@ class IMManager {
|
|||||||
int num = data['num'];
|
int num = data['num'];
|
||||||
_uploadFileListener?.partSize(id, partSize, num);
|
_uploadFileListener?.partSize(id, partSize, num);
|
||||||
break;
|
break;
|
||||||
case 'uploadComplete':
|
case 'uploadProgress':
|
||||||
String id = data['id'];
|
String id = data['id'];
|
||||||
int fileSize = data['fileSize'];
|
int fileSize = data['fileSize'];
|
||||||
int streamSize = data['streamSize'];
|
int streamSize = data['streamSize'];
|
||||||
int storageSize = data['storageSize'];
|
int storageSize = data['storageSize'];
|
||||||
_uploadFileListener?.uploadComplete(
|
_uploadFileListener?.uploadProgress(
|
||||||
id, fileSize, streamSize, storageSize);
|
id, fileSize, streamSize, storageSize);
|
||||||
break;
|
break;
|
||||||
case 'uploadID':
|
case 'uploadID':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user