addUsersToGroup method
Future<void>
addUsersToGroup(
- String jid,
- List<
String> userList, - dynamic callback(
- FlyResponse response
override
This method is used to add the members to the group.
Implementation
@override
Future<void> addUsersToGroup(String jid, List<String> userList,
Function(FlyResponse response)? callback) async {
bool? response;
try {
response = await mirrorFlyMethodChannel.invokeMethod<bool>(
'addUsersToGroup', {"jid": jid, "members": userList});
LogMessage.d("addUsersToGroup Response ", " $response");
callback?.call(FlyResponse(true, FlyConstants.empty, FlyConstants.empty));
// return response;
} on PlatformException catch (e) {
LogMessage.d("Platform Exception =", " $e");
callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
FlyException(e.code, e.message, e.details)));
} on Exception catch (e) {
LogMessage.d("Exception ", " $e");
callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
FlyException(FlyErrorCode.unHandle, FlyErrorMessage.unHandle, e)));
}
}