Skip to main content

brix_storage 1.1.0 copy "brix_storage: ^1.1.0" to clipboard
brix_storage: ^1.1.0 copied to clipboard

Safe local storage for Flutter apps: values and secrets with reinstall and broken-keystore handling, an offline copy of backend lists, and a ready-made brix session store.

example/main.dart

// brix_storage in a few lines. Run inside a Flutter app (it uses
// shared_preferences and flutter_secure_storage).
import 'package:brix_storage/brix_storage.dart';
import 'package:flutter/widgets.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final storage = BrixStorage(
    onError: (error, _) => debugPrint('storage problem: $error'),
  );

  await storage.write('locale', 'en');
  await storage.writeSecret('token', 'secret-token');

  debugPrint('locale: ${await storage.read('locale')}');
  debugPrint('token saved: ${await storage.readSecret('token') != null}');
}
0
likes
160
points
1.2k
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Safe local storage for Flutter apps: values and secrets with reinstall and broken-keystore handling, an offline copy of backend lists, and a ready-made brix session store.

Repository (GitHub)
View/report issues

Topics

#storage #secure-storage #shared-preferences #authentication

License

MIT (license)

Dependencies

brix, flutter, flutter_secure_storage, shared_preferences

More

Packages that depend on brix_storage