getSecureData static method

Future<String?> getSecureData(
  1. String key
)

Implementation

static Future<String?> getSecureData(String key) async {
  try {
    if (_prefs == null) throw Exception('SharedPreferences not initialized');
    return _prefs!.getString(key);
  } catch (e) {
    throw Exception('Failed to get data: $e');
  }
}