getFromSecure function

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

Gets a string value from secure storage or SharedPreferences as fallback

Implementation

Future<String?> getFromSecure(String key) async {
  // For this implementation, we'll use SharedPreferences as a simple storage
  // In a production app, you would use a more secure solution like flutter_secure_storage
  final prefs = await SharedPreferences.getInstance();
  return prefs.getString('onairos_$key');
}