This post lists exact steps for quick setup of BLoC pattern in Flutter app.
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.