init static method
Future<void>
init({
- required String hostUrl,
- RemoteConfig? remoteConfig,
- SharkErrorFunction? onError,
- 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);
}