google_secret_manager 1.0.4
google_secret_manager: ^1.0.4 copied to clipboard
This package provides an API for accessing Google Secret Manager using Dart. This package is useful for developers who want to securely store and retrieve secrets in their Dart applications using Goog [...]
example/google_secret_manager_example.dart
import 'dart:io';
import 'package:google_secret_manager/google_secret_manager.dart';
Future<void> main() async {
final path = '${Directory.current.path}/gcm-service-account.json';
final json = File(path).readAsStringSync();
await GoogleSecretManager.initViaServiceAccountJson(json);
final key = 'adjust_token';
final response = await GoogleSecretManager.instance.get(key);
print('$key: ${response?.payload?.data}');
}