Can anyone tell the difference of "flutter_bloc" and "bloc" packages in Flutter

Question

Asked by Abhin K on August 19, 2020 (source).

I am getting started with Bloc in Flutter. Can anyone tell what is really "flutter_bloc" and "bloc" packages I have these questions.

  1. are they same.
  2. when/how to use this.
  • Thank you

Answer

Question answered by Kris (source).

The 'bloc' package contains things you will use in your Bloc layer, like the Bloc class. This isn't necessarily flutter dependent, it is just the logic architecture of your app.

The 'flutter bloc' package contains elements you will use in your UI layer. It includes widgets like BlocProvider and BlocBuilder, which are widgets and thus flutter dependent.

FLUTTER FLUTTER-BLOC FLUTTER-DEPENDENCIES FLUTTER-PACKAGES FLUTTER-TEST
SHARE: