saveString method
Implementation
Future<void> saveString(
String key,
String value, {
bool encryptValue = false,
}) async {
final box = await _openBox();
if (encryptValue) {
final iv = encrypt.IV.fromSecureRandom(16);
final encrypted = _encrypter.encrypt(value, iv: iv);
final combined = '${iv.base64}:${encrypted.base64}';
await box.put(key, combined);
} else {
await box.put(key, value);
}
}