connectPatchbayVmService function
Future<PatchbayClient>
connectPatchbayVmService(
- Uri serviceUri, {
- PatchbayRuntimeIdentity? expectedIdentity,
Connects to a running App over its VM Service URI.
The whole opt-in client library (PB-050-13) is these two factories plus the
types they hand back: the connection classes themselves, the profiling and
cancellation surfaces, the timeout wrapper and the request-id generator stay
inside src/, so a later transport change is not a source-breaking one.
expectedIdentity, when given, is compared field by field against the
handshake the host answers with; a mismatch throws
PatchbayProtocolException('identityValidationFailed') instead of returning
a connection to a different App than the caller meant.
Implementation
Future<PatchbayClient> connectPatchbayVmService(
Uri serviceUri, {
PatchbayRuntimeIdentity? expectedIdentity,
}) =>
PatchbayConnection.connect(serviceUri, expectedIdentity: expectedIdentity);