This post lists exact steps for quick setup of BLoC pattern in Flutter app.
Introduction
We have already talked about working with BLoC pattern in depth in our previous post. So this post is not going to be a long one but rather a “quick” setup guide as the title suggests.
Setup For BLoC Pattern
- First and foremost, add dependency for rxdart package.
- Create your BLoCs.
- Create a global App State and add the BLoCs.
- Use App State Provider to wrap your Flutter App.
- Make use of BLoCs within your widgets.
Related Posts On Bloc Pattern
Flutter: Working With BLoC using Reactive Programming
Flutter: Inherited Widget Basics
Build Reactive Apps With Flutter (Youtube Video By Google Developers)