connectPatchbayDirect function

PatchbayClient connectPatchbayDirect({
  1. required Uri endpoint,
  2. required String bearerToken,
  3. required int schemaVersion,
  4. required String applicationId,
  5. required String appInstanceId,
  6. Duration timeout = const Duration(seconds: 60),
})

Connects to a running App over the explicitly enabled direct HTTP transport.

Synchronous by construction: the direct transport has no handshake to await before the first request, and the identity the caller declares here is checked by the host on every call rather than once at dial time. Flutter SDK diagnostic passthroughs (widgetTree / renderTree / focusTree) remain VM-Service-only and refuse with flutterDiagnosticUnavailable here.

Implementation

PatchbayClient connectPatchbayDirect({
  required Uri endpoint,
  required String bearerToken,
  required int schemaVersion,
  required String applicationId,
  required String appInstanceId,
  Duration timeout = const Duration(seconds: 60),
}) => PatchbayDirectConnection(
  endpoint: endpoint,
  bearerToken: bearerToken,
  schemaVersion: schemaVersion,
  applicationId: applicationId,
  appInstanceId: appInstanceId,
  timeout: timeout,
);