init static method

Future<void> init(
  1. {CacheProvider cacheProvider}

This method is used for initializing the _cacheProvider instance.

This method must be called before the Settings screen is displayed.

Cache provider is optional, default cache provider uses the shared preferences based cache provider implementation.


static Future<void> init({CacheProvider cacheProvider}) async {
  cacheProvider ??= SharePreferenceCache();

  _cacheProvider = cacheProvider;
  await _cacheProvider.init();