storeSecureData static method

Future<void> storeSecureData(
  1. String key,
  2. String value
)

Implementation

static Future<void> storeSecureData(String key, String value) async {
  try {
    if (_prefs == null) throw Exception('SharedPreferences not initialized');
    await _prefs!.setString(key, value);
  } catch (e) {
    throw Exception('Failed to store data: $e');
  }
}