A simple Flutter app demonstrating persistent CRUD operations using Hive for local storage and Riverpod for state management. This updated version includes full support for localization and internationalization (i18n), as well as database encryption.
- Multi-language support with localization.
- Encrypted persistent storage using Hive.
- Add, edit, and delete todos.
- Reactive UI using Riverpod.
- Clean project structure with distinct layers for models, repositories, providers, and pages.
This app is localized for the following languages:
- 🇬🇧 English (en)
- 🇪🇸 Spanish (es)
- 🇧🇷 Brazilian Portuguese (pt)
The localization is managed using the official flutter_gen and intl packages, storing strings in .arb (Application Resource Bundle) files.
lib/
├── l10n/
│ ├── intl_en.arb
│ ├── intl_es.arb
│ └── intl_pt.arb
├── main.dart
├── models/
│ ├── todo.dart
│ └── todo.g.dart
├── repositories/
│ └── todo_repository.dart
├── providers/
│ └── todo_provider.dart
└── pages/
├── home_page.dart
└── todo_form_page.dart
- l10n/ → Contains localization resource files.
- models/ → Hive data models.
- repositories/ → Handles data operations (CRUD).
- providers/ → State management with Riverpod.
- pages/ → UI pages.
- Flutter SDK installed
- Dart SDK installed
- Android Studio or VS Code with Flutter extension
git clone https://github.com/marcus-exe/hive_app.git
cd hive_appflutter pub getflutter pub run build_runner build --delete-conflicting-outputs
flutter gen-l10nNote: These commands generate the necessary
todo.g.dartfile for Hive and the localization files for translations. The encryption key will be generated and stored securely on the first launch of the app.
flutter run- Hive → Lightweight NoSQL database.
- Hive Flutter → Hive integration for Flutter.
- Flutter Riverpod → A robust state management solution.
- Flutter Localizations → Flutter's built-in localization package.
- intl → Dart's official internationalization package.
- flutter_secure_storage → Securely stores the Hive encryption key.
- Tap the + button to add a new todo.
- Tap on a todo to edit.
- Tap the trash icon to delete.
- The app's language will change automatically based on your device's language settings.
-
Clean Architecture:
- Models → Data representation.
- Repositories → Handles Hive operations.
- Providers → Manages app state (Riverpod).
- Pages → UI components.
-
Benefits:
- Clear separation of concerns.
- Easy to maintain and extend with new features.
- Reactive UI updates.
| Home | Add | List |
|---|---|---|
![]() |
![]() |
![]() |
- Add search/filter functionality.
- Integrate with a remote backend.
- Implement authentication.
- Add unit and widget tests.
This project is open-source and available under the MIT License.


