getCredentialsCached method

Future<PowerSyncCredentials?> getCredentialsCached()

Get credentials current cached, or fetch new credentials if none are available.

These credentials may have expired already.

Implementation

Future<PowerSyncCredentials?> getCredentialsCached() {
  if (_cachedCredentials != null) {
    return Future.value(_cachedCredentials);
  }
  return prefetchCredentials();
}