This project demonstrates a basic implementation of state management in Flutter using the Bloc and Cubit pattern. The application features a simple counter and a to-do list, showcasing the use of both Cubit and Bloc for managing state.
- Counter Functionality: Increment and decrement the counter value using Bloc.
- To-Do List Management: Add tasks to a to-do list using Cubit.
- State Management with Bloc and Cubit: Examples of both state management approaches.
- Clean and Modular Code: Well-structured codebase for easy understanding and extension.
- bloc: Contains the CounterBloc for managing the counter state.
- cubit: Contains the TodoCubit for managing the list of to-dos.
- models: Defines the Todo model.
- screens: Contains the main UI components and pages.
-
Clone the repository:
git clone https://github.com/yourusername/flutter_bloc_implementation.git cd flutter_bloc_implementation
-
Install dependencies:
flutter pub get
-
Run the app:
flutter run
- Counter: Use the increment and decrement buttons to change the counter value. The initial value is set to 1903.
- To-Do List: Add new tasks to the to-do list using the input field and the add button.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or additions.