init method

Future<void> init({
  1. int securePreferencesBoxNo = 1,
  2. int fileCacheBoxVersion = 1,
})

Implementation

Future<void> init({int securePreferencesBoxNo = 1, int fileCacheBoxVersion = 1}) async {
  await Hive.initFlutter('mcg');

  preferences = MyPreferences();
  await preferences.init();
  _prepareSecureKey();
  securePreferences = SecurePreferences();

  await securePreferences.init(boxNo: securePreferencesBoxNo);

  fileCacheBox = await Hive.openBox('cacheBox$fileCacheBoxVersion');
}