getTopicNotificationsServiceRestriction static method

Set<OnlineRestrictions> getTopicNotificationsServiceRestriction(
  1. ServiceGroupType serviceType
)

Get topic notifications service restrictions.

Parameters

Returns

Throws

  • An exception if it fails.

Implementation

static Set<OnlineRestrictions> getTopicNotificationsServiceRestriction(
  ServiceGroupType serviceType,
) {
  final OperationResult resultString = objectMethod(
    0,
    'SdkSettings',
    'getTopicNotificationsServiceRestriction',
    args: serviceType.id,
  );

  final int packed = resultString['result'];

  return OnlineRestrictions.values
      .where(
        (OnlineRestrictions element) => (packed & element.id) != 0,
      )
      .toSet();
}