Flutter App Development with RxDart and the BLoC Pattern

The classic pattern of Flutter, BLoC

Kevin Jonathan
4 min readJan 16, 2023
Photo by Artur Shamsutdinov on Unsplash

Non-Medium Members can read the full story here.

Flutter is a popular framework for building cross-platform mobile applications. However, as apps become more complex, managing state and handling asynchronous events can become challenging. Also, relying on setState too much might make our code harder to read. This is where RxDart and the BLoC pattern come in to save us!

RxDart and BLoC Pattern: What and Why?

RxDart is an extension of the popular ReactiveX (Rx) library for Dart, which provides powerful tools for working with asynchronous data streams. We can use this package by going to pub.dev and installing it.

The BLoC pattern, on the other hand, is a design pattern that helps to separate the business logic of an app from its presentation. This pattern is probably the most commonly used pattern among Flutter developers. I also implemented BLoC on my published app before and found it really useful for…

--

--

Kevin Jonathan

Just a student intricately weaving personal life experience and technology related stuffs, currently navigating the intersections of life.