An open API service indexing awesome lists of open source software.

https://github.com/getrighhttt/flutter_bloc-post-example

Example of making api requests in BLoC.
https://github.com/getrighhttt/flutter_bloc-post-example

bloc events flutter http http-client

Last synced: 11 months ago
JSON representation

Example of making api requests in BLoC.

Awesome Lists containing this project

README

          

## **Api Request in BLoC**

## **Introduction**
Practicing the BLoC pattern to handle state and events.
Used jsonplaceholder to mimic making two different api calls. One on the main
screen and the other when the floating action button is clicked.

Also used method channels to get the battery life of android & ios devices.

## **Installation**
1. Have Android Studio downloaded.
2. Clone the repository into Android Studio: **`git clone: git@github.com:GetRighhttt/Flutter_BLoC-Post-Example.git`**

## **Usage**
1. Open the project in Android Studio.

2. Modify the source code to fit your needs.

3. Build the project.

4. Start the project.

5. Use the project as desired.

## **Contributing**
1. Fork the repository.

2. Create a new branch for your changes.

3. Make your changes.

4. Write tests to cover your changes.

5. Run the tests to ensure they pass.

6. Commit your changes.

7. Push your changes to your forked repository.

8. Submit a pull request.

### Demos

https://github.com/user-attachments/assets/c90c6c36-7ca9-42b9-acc2-03a3efe86ac6

#### Battery Life
https://github.com/user-attachments/assets/ec84db6a-eb08-4232-a942-9ee5e04ede50

## **Contact**

If you have any questions or comments, please contact **stefanbusiness95@gmail.com**.