init static method

Future<bool> init({
  1. String prefix = '',
})

Implementation

static Future<bool> init({String prefix = ''}) async {
  if (sharedPreferences != null) return false;
  PrefService.prefix = prefix;
  sharedPreferences = await SharedPreferences.getInstance();
  clearCache();
  return true;
}