init static method

Future<void> init({
  1. required String hostUrl,
  2. RemoteConfig? remoteConfig,
  3. SharkErrorFunction? onError,
  4. CacheStrategy? cacheStrategy,
})

init shark client see also _SharkCore.init remoteConfig config for network client cacheStrategy the strategy for json data caching

Implementation

static Future<void> init({
  required String hostUrl,
  RemoteConfig? remoteConfig,
  SharkErrorFunction? onError,
  CacheStrategy? cacheStrategy,
}) {
  return _ShareCore.instance.init(hostUrl,
      remoteConfig: remoteConfig,
      interceptors: remoteConfig?.interceptors,
      cacheStrategy: cacheStrategy);
}