subscribeToServiceCreateOrUpdateEvents method

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

Implementation

Future<EntitySubscription<EncryptedService>> subscribeToServiceCreateOrUpdateEvents(String sdkId, FilterOptions<Service> filter, EntitySubscriptionConfiguration? subscriptionConfig) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ContactApi.subscribeToServiceCreateOrUpdateEvents',
		{
			"sdkId": sdkId,
			"filter": jsonEncode(FilterOptions.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));
}