subscribeToServiceCreateOrUpdateEvents method

Future<EntitySubscription<EncryptedService>> subscribeToServiceCreateOrUpdateEvents(
  1. String sdkId,
  2. BaseFilterOptions<Service> filter,
  3. EntitySubscriptionConfiguration? subscriptionConfig
)

Implementation

Future<EntitySubscription<EncryptedService>> subscribeToServiceCreateOrUpdateEvents(String sdkId, BaseFilterOptions<Service> filter, EntitySubscriptionConfiguration? subscriptionConfig) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ContactBasicApi.subscribeToServiceCreateOrUpdateEvents',
		{
			"sdkId": sdkId,
			"filter": jsonEncode(BaseFilterOptions.encode(filter)),
			"subscriptionConfig": jsonEncode(subscriptionConfig == null ? null : EntitySubscriptionConfiguration.encode(subscriptionConfig!)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method subscribeToServiceCreateOrUpdateEvents");
	final parsedResJson = jsonDecode(res);
	return EntitySubscription(parsedResJson, (x0) => EncryptedService.fromJSON(x0));
}