getSecretFromCloud static method

Future<String> getSecretFromCloud(
  1. String key
)

Retrieves a specific secret from Cloud Functions (e.g. googleApiKey for Maps)

Implementation

static Future<String> getSecretFromCloud(String key) async {
  try {
    final result = await callSecureOps({
      'action': 'getSecret',
      'key': key,
    });
    return result['value'] ?? '';
  } catch (e, st) {
    NeomErrorLogger.recordError(e, st, module: 'neom_core', operation: 'getSecretFromCloud');
    return '';
  }
}