waitForEvent method
Implementation
Future<EntitySubscriptionEvent<T>?> waitForEvent(Duration timeout) async {
final eventJson = await CardinalSdkPlatformInterface.instance
.subscription
.waitForEvent(_instanceId, timeout);
if (eventJson != null) {
return EntitySubscriptionEvent.fromJSON(eventJson, _decodeT);
} else {
return null;
}
}