getGroupsWithoutNotice method Null safety

  1. @Deprecated("Switch to using EMPushConfig#noDisturbGroupsFromServer instead.")
Future<List<String>> getGroupsWithoutNotice()
@Deprecated("Switch to using EMPushConfig#noDisturbGroupsFromServer instead.")

Implementation

@Deprecated("Switch to using EMPushConfig#noDisturbGroupsFromServer instead.")
Future<List<String>> getGroupsWithoutNotice() async {
  Map result = await _channel
      .invokeMethod(ChatMethodKeys.getGroupsWithoutPushNotification);
  try {
    EMError.hasErrorFromResult(result);
    List<String> list = [];
    result[ChatMethodKeys.getGroupsWithoutPushNotification]
        ?.forEach((element) {
      if (element is String) {
        list.add(element);
      }
    });
    return list;
  } on EMError catch (e) {
    throw e;
  }
}