Skip to content

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.

Notifications You must be signed in to change notification settings

erolkuluslu/bloc_implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Bloc Implementation

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.

Features

  • 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.

Project Structure

  • 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.

Getting Started

  1. Clone the repository:

    git clone https://github.com/yourusername/flutter_bloc_implementation.git
    cd flutter_bloc_implementation
  2. Install dependencies:

    flutter pub get
  3. Run the app:

    flutter run

Usage

  • 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

Contributions are welcome! Please open an issue or submit a pull request for any improvements or additions.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published