checkTransport method

  1. @visibleForTesting
void checkTransport()

Checks whether the transport has been properly initialized.

Implementation

@visibleForTesting
void checkTransport() {
  if (transport != null) {
    return;
  }
  transportOptions ??= TransportOptions(
    'firebasedataconnect.googleapis.com',
    null,
    true,
  );
  auth ??= app.getService<FirebaseAuth>();
  appCheck ??= app.getService<FirebaseAppCheck>();

  final rest = RestTransport(
    transportOptions!,
    options,
    app.options.appId,
    _sdkType,
    appCheck,
  );
  final ws = WebSocketTransport(
    transportOptions!,
    options,
    app.options.appId,
    _sdkType,
    appCheck,
    auth,
  );
  transport = _RoutingTransport(rest, ws);
}