Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

Introduction to Flutter BLoC 8

Blog post from LogRocket

Post Details
Company
Date Published
Author
Lewis Cianci
Word Count
2,096
Language
-
Hacker News Points
-
Summary

Flutter, a relatively new cross-platform software development framework, offers a range of high-quality open-source packages, including state management solutions like BLoC, which was introduced in late 2019 and has seen significant evolution in tandem with Flutter's growth. The latest update to the flutter_bloc library introduces breaking changes, requiring manual code upgrades but offering improved functionality and stability. The transition from the mapEventToState function to a new event handler approach in flutter_bloc 8.0.0 simplifies code by reducing lines and enhancing readability, while also resolving timing issues associated with Dart streams. This upgrade facilitates the management of both synchronous and asynchronous operations more effectively, making it easier for developers to work with long-running operations and streams without the complexity of yield generator functions. Despite the challenges of migration, the changes are deemed worthwhile for enhancing the reliability and consistency of applications built with Flutter.