updatePushServiceForGroup method Null safety

  1. @deprecated
Future<void> updatePushServiceForGroup(
  1. {required List<String> groupIds,
  2. required bool enablePush}
)

Sets whether to turn on or turn off the push notification for the the specified groups.

groupIds The list of groups to be set.

enablePush enable push notification. true: Turns on the notification; false: Turns off the notification;

Throws A description of the issue that caused this exception. See ChatError

Implementation

@deprecated
Future<void> updatePushServiceForGroup({
  required List<String> groupIds,
  required bool enablePush,
}) async {
  Map req = {'noPush': !enablePush, 'group_ids': groupIds};
  Map result = await PushChannel.invokeMethod(
      ChatMethodKeys.updateGroupPushService, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}