The ToDo app is a simple task management application that allows users to create, update, and delete tasks. It uses Hive as a local database for efficient and lightweight storage of tasks on the device.
- Add new tasks with a title and description.
- Mark tasks as completed.
- Edit existing tasks.
- Delete tasks.
- Local storage using Hive.
- Flutter: The framework used for building the mobile app.
- Hive: A lightweight and fast NoSQL database for local storage in Flutter.
is a fast and lightweight NoSQL database for Flutter, designed for local storage in mobile and web applications. With its simplicity and performance, Hive is an excellent choice for handling local data persistence efficiently.
-
Efficiency: Hive is built with a focus on speed and efficiency, making it ideal for storing and retrieving data locally in Flutter apps.
-
NoSQL Structure: It follows a NoSQL data model, allowing you to store data in a schema-free format, making it flexible and easy to work with.
-
Dart Integration: Being specifically designed for Flutter, Hive seamlessly integrates with Dart, providing a smooth development experience.
-
Compact Size: Hive has a minimal footprint, ensuring that it doesn't bloat your app size, crucial for mobile applications.
To get started with Hive, add the package to your pubspec.yaml
file:
dependencies:
hive: ^2.0.0
hive_flutter: ^1.1.0
Then, run:
flutter pub get
For more details and usage guidelines, check out the official documentation.
import 'package:hive/hive.dart';
void main() async {
await Hive.openBox('myBox');
var box = Hive.box('myBox');
box.put('key', 'value');
print('Stored value: ${box.get('key')}');
await Hive.close();
}
Explore Hive and discover a powerful yet lightweight solution for local data storage in your Flutter projects!
- Flutter installed on your machine. You can follow the instructions on the official Flutter website for installation.
- Clone this repository to your local machine.
-
Open a terminal window in the project directory.
-
Run the following command to get the required dependencies:
flutter pub get
-
Ensure you have an emulator/device connected or running.
-
Run the following command to start the app:
flutter run
-
Launch the app on your emulator/device.
-
Use the app to create, edit, and manage your tasks.
The app uses Hive as a local database for efficient and fast storage of tasks. The Hive database is located in the hive
directory within the app's data directory.
-
To generate Hive adapters:
flutter packages pub run build_runner build
-
To run Hive tests:
flutter test
Feel free to contribute to the development of this app by opening issues or submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the Flutter and Hive communities for their awesome contributions.