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.
- Host: GitHub
- URL: https://github.com/getrighhttt/flutter_bloc-post-example
- Owner: GetRighhttt
- Created: 2024-07-22T13:43:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-29T02:22:24.000Z (over 1 year ago)
- Last Synced: 2025-02-07T16:16:22.982Z (about 1 year ago)
- Topics: bloc, events, flutter, http, http-client
- Language: C++
- Homepage:
- Size: 326 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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**.