init method

Future<void> init({
  1. required Key key,
  2. required IV iv,
  3. bool initialApIcon = true,
})

Implementation

Future<void> init({
  required encrypt.Key key,
  required encrypt.IV iv,
  bool initialApIcon = true,
}) async {
  if (isSupport) {
    prefs = await SharedPreferences.getInstance();
    //TODO logic move to other place
    ApIcon.code = getString(
      ApConstants.prefIconStyleCode,
      ApIcon.outlined,
    );
    encrypter = encrypt.Encrypter(
      encrypt.AES(
        key,
        mode: encrypt.AESMode.cbc,
      ),
    );
    ApPreferenceUtil.iv = iv;
  }
}