init static method

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

Implementation

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