initialize static method

Future<void> initialize(
  1. String key, {
  2. IEncryptor? encryptor,
})

Initialize the EncryptedSharedPreferences with the provided encryption key.

Implementation

static Future<void> initialize(String key, {IEncryptor? encryptor}) async {
  _key = key;
  _decorator = SharedPreferencesDecoratorAsync(
      encryptor: encryptor ?? AESEncryptor(), key: _key!);
}