feature_flags_toggly_secure_storage 0.1.1 copy "feature_flags_toggly_secure_storage: ^0.1.1" to clipboard
feature_flags_toggly_secure_storage: ^0.1.1 copied to clipboard

Secure-storage persistence backend for the Toggly Flutter SDK (feature_flags_toggly), enabling offline feature flag, variant, and JWKS caching via flutter_secure_storage.

feature_flags_toggly_secure_storage #

Secure-storage persistence backend for the Toggly Flutter SDK (feature_flags_toggly).

The Toggly SDK is memory-only by default. Add this package to persist feature flags, variant definitions, and JWKS in the platform secure store (Keychain on iOS/macOS, Keystore-backed encrypted storage on Android) so flags survive app restarts and remain available offline.

Offline restart also requires a stable identity passed to Toggly.init / Toggly.setIdentity. The ephemeral in-memory identity changes on every cold start, so cached entries would not be found.

Install #

dependencies:
  feature_flags_toggly: ^1.2.0
  feature_flags_toggly_secure_storage: ^0.1.0

Usage #

import 'package:feature_flags_toggly/feature_flags_toggly.dart';
import 'package:feature_flags_toggly_secure_storage/feature_flags_toggly_secure_storage.dart';

await Toggly.init(
  appKey: '<your-app-key>',
  environment: 'Production',
  identity: currentUserId, // stable identity for offline restart
  config: TogglyConfig(
    cacheProvider: SecureStorageCacheProvider(),
  ),
);

You can inject a configured FlutterSecureStorage (for example with custom Android/iOS options):

SecureStorageCacheProvider(
  storage: const FlutterSecureStorage(
    aOptions: AndroidOptions(encryptedSharedPreferences: true),
  ),
);

Other backends #

License #

BSD-3-Clause. See LICENSE.

0
likes
150
points
95
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Secure-storage persistence backend for the Toggly Flutter SDK (feature_flags_toggly), enabling offline feature flag, variant, and JWKS caching via flutter_secure_storage.

License

BSD-3-Clause (license)

Dependencies

feature_flags_toggly, flutter, flutter_secure_storage

More

Packages that depend on feature_flags_toggly_secure_storage