SecretCache class abstract

Contract for persisting secrets locally between app launches.

Implement this to provide encrypted storage — the Dart SDK ships no concrete implementation so it stays free of platform-specific dependencies.

For Flutter apps use FlutterSecureSecretCache from your app or the bella_baxter_flutter package (backed by flutter_secure_storage).

final client = BellaClient(BellaClientOptions(
  baseUrl: '...',
  apiKey: '...',
  cache: FlutterSecureSecretCache(),  // ← inject here
));

Constructors

SecretCache()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Removes the cached secrets (e.g. on logout or API key rotation).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() Future<Map<String, String>?>
Returns the last cached secrets, or null if nothing is stored yet.
toString() String
A string representation of this object.
inherited
write(Map<String, String> secrets) Future<void>
Persists secrets (called after every successful BellaClient.pullSecrets).

Operators

operator ==(Object other) bool
The equality operator.
inherited