zeba_academy_local_storage_plus
๐ A powerful unified local storage solution for Flutter that provides a single API to manage Hive, SQLite, and SharedPreferences with optional encryption, caching, and backup support.
zeba_academy_local_storage_plus simplifies local data management for Flutter apps by providing a clean, consistent interface across multiple storage systems.
Perfect for offline-first apps, secure data storage, and high-performance caching.
โจ Features
โ Unified Storage API Use the same API for Hive, SQLite, and SharedPreferences.
โ Multiple Storage Backends
- Hive (fast key-value storage)
- SQLite (structured relational storage)
- SharedPreferences (lightweight settings)
โ Optional Encryption Protect sensitive data with optional encryption support.
โ Auto Backup & Restore Backup and restore local data easily.
โ Offline-First Support Perfect for apps that work without internet.
โ Caching Layer Cache frequently accessed data for faster performance.
โ Lightweight & Flexible Use only what you need with minimal overhead.
๐ฆ Installation
Add the package to your pubspec.yaml:
dependencies:
zeba_academy_local_storage_plus: ^1.0.0
Then run:
flutter pub get
๐ Getting Started
Initialize the storage system before using it.
import 'package:zeba_academy_local_storage_plus/zeba_academy_local_storage_plus.dart';
void main() async {
final storage = await ZebaLocalStoragePlus.init(
storageType: StorageType.hive,
encrypted: false,
);
}
๐พ Storing Data
await storage.set('username', 'Sarvesh');
๐ Reading Data
final username = await storage.get('username');
print(username);
โ Deleting Data
await storage.delete('username');
๐ Using Different Storage Engines
Hive
final storage = await ZebaLocalStoragePlus.init(
storageType: StorageType.hive,
);
SQLite
final storage = await ZebaLocalStoragePlus.init(
storageType: StorageType.sqlite,
);
SharedPreferences
final storage = await ZebaLocalStoragePlus.init(
storageType: StorageType.sharedPreferences,
);
๐ Encryption Example
final storage = await ZebaLocalStoragePlus.init(
storageType: StorageType.hive,
encrypted: true,
encryptionKey: 'my_secret_key',
);
๐ก Use Cases
This package is ideal for:
โข Offline-first mobile apps โข Secure local storage โข App configuration and settings โข Caching frequently accessed data โข Flutter apps needing multiple storage engines
๐งช Testing
Run tests with:
flutter test
๐ Package Goals
zeba_academy_local_storage_plus aims to provide:
โข Simple API for complex storage systems โข High performance local storage โข Secure and flexible data management โข Developer-friendly Flutter integration
๐ค Contributions
Contributions are welcome! Feel free to submit issues or pull requests to improve the package.
๐ License
This project is licensed under the GPL-3.0 License.
About Me
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.
You can learn more about me and my work at sufyanism.com or connect with me on Linkedin
Your all-in-one no-bloat hub!
๐ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐ปโจ
Zeba Academy is a learning platform dedicated to coding, technology, and development.
โก Visit our main site: https://zeba.academy โก Explore hands-on courses and resources at: https://code.zeba.academy โก Check out our YouTube for more tutorials: https://www.youtube.com/@zeba.academy โก Follow us on Instagram: https://www.instagram.com/zeba.academy/
โญ If you find this package useful, consider giving it a star and sharing it with the Flutter community.
Thank you for visiting!