acceptApplication method

void acceptApplication ({String userName, String groupId, dynamic onSuccess(), dynamic onError(int errorCode, String desc) })

同意加群申请

Implementation

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