uploadGroupSharedFile method

void uploadGroupSharedFile ({String groupId, String filePath, dynamic onSuccess(), dynamic onError(int errorCode, String desc) })

上传共享文件至群组

Implementation

void uploadGroupSharedFile({
  final String groupId,
  final String filePath,
  onSuccess(),
  onError(int errorCode, String desc)}){
  Future<Map<String, dynamic>> result = _emGroupManagerChannel
      .invokeMethod(EMSDKMethod.uploadGroupSharedFile, {"groupId" : groupId, "filePath" : filePath});
  result.then((response) {
    if (response['success']) {
      if (onSuccess != null) {
        onSuccess();
      }
    } else {
      if (onError != null) onError(response['code'], response['desc']);
    }
  });
}