setApiKey method

Future<void> setApiKey(
  1. String apiKey
)

Implementation

Future<void> setApiKey(String apiKey) async {
  try {
    await _secureStorage.write(key: _apiKeySecureKey, value: apiKey);
    notifyListeners();
  } catch (e) {
    debugPrint('Error writing API key to secure storage: $e');
    rethrow;
  }
}