---
title: "Discussion on \"Flutter BLoC (v8): How to Fetch Data From an API? - 2022 Guide\" | Hashnode"
description: "Discussion on \"Flutter BLoC (v8): How to Fetch Data From an API? - 2022 Guide\". How to fetch the data from the API by using BLoC Architecture?"
url: "https://hashnode.com/posts/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide/61d7d5078d56921d07b8ff95"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Flutter BLoC (v8): How to Fetch Data From an API? - 2022 Guide](https://dhruvnakum.xyz/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide?utm_source=hashnode&utm_medium=feed)

How to fetch the data from the API by using BLoC Architecture?

Jan 7, 2022 · 6 min read · dhruvnakum.xyz  
Updated Nov 27, 2022  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#flutter-examples](https://hashnode.com/tag/flutter-examples)
-   [#dart](https://hashnode.com/tag/dart)
-   [#apis](https://hashnode.com/tag/apis)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Dhruv Nakum](https://hashnode.com/@Dhruv-Nakum)

@Dhruv-Nakum · India

  
[View profile](https://hashnode.com/@Dhruv-Nakum)

Developer 👨‍💻

I'm a mobile/web developer 👨‍💻 who loves to build projects and share valuable tips for programmers Follow me for Flutter, React/Next.js, and other awesome tech-related stuff 😉

## Responses 4

Markdown supported · ⌘↵ to post

[agus subandrio](https://hashnode.com/@agusrio)

[Dec 10, 2023](https://hashnode.com/posts/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide/61d7d5078d56921d07b8ff95/comment/6575586ae9e5c65d1dacdfbf)

great articles, i get some articles what i want to know, thanks bro.

[Nicolas Chappuis](https://hashnode.com/@NicoLoco)

[Sep 12, 2022](https://hashnode.com/posts/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide/61d7d5078d56921d07b8ff95/comment/631f76c46c86d75accc7eb7d)

Hey, Nice article ! I like it, BTW when I run the compiled app, I have an issue :(

. The following \_CastError was thrown building \_BodyBuilder: type 'Null' is not a subtype of type 'JokeBloc' in type cast

The relevant error-causing widget was Scaffold package:test\_bloc/…/home/home.dart:15 When the exception was thrown, this was the stack

Any idea what it can be ? Because I'm really interested to use this pattern for our future apps

[Vianey Cargas Morales](https://hashnode.com/@softwarecoco)

[Mar 3, 2022](https://hashnode.com/posts/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide/61d7d5078d56921d07b8ff95/comment/6220d82c4b7ec93a5c1eb7cf)

Excellent please can you make a video with flutter block with a like button? in flutter

[Noel Rivero](https://hashnode.com/@BrainOwl)

[Jan 26, 2022](https://hashnode.com/posts/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide/61d7d5078d56921d07b8ff95/comment/61f19e1287fd2728e7cd658b)

Great article

[Dhruv Nakum](https://hashnode.com/@Dhruv-Nakum)

[Jan 27, 2022](https://hashnode.com/posts/flutter-bloc-v8-how-to-fetch-data-from-an-api-2022-guide/61d7d5078d56921d07b8ff95/comment/61f19e1287fd2728e7cd658b#reply-61f22e5187fd2728e7cd73fe)

Thanks 😀
