getOrigin method

  1. @override
Uri getOrigin()

Implementation

@override
Uri getOrigin() {
  var originUri = origin != null
      ? (ssl ? Uri.https(origin!, '') : Uri.http(origin!, ''))
      : null;

  return Uri(
    scheme: originUri?.scheme == '' ? 'https' : originUri?.scheme ?? 'https',
    host: originUri?.host ?? 'ps.pndsn.com',
    port: originUri?.port,
    queryParameters: {'pnsdk': 'PubNub-Dart/${Core.version}'},
  );
}