Skip to content

Getting Started

The bloc ecosystem consists of multiple packages listed below:

PackageDescriptionLink
angular_blocAngularDart Componentspub package
blocCore Dart APIspub package
bloc_concurrencyEvent Transformerspub package
bloc_lintCustom Linterpub package
bloc_testTesting APIspub package
bloc_toolsCommand-line Toolspub package
flutter_blocFlutter Widgetspub package
hydrated_blocCaching/Persistence Supportpub package
replay_blocUndo/Redo Supportpub package
Terminal window
# Add bloc to your project.
dart pub add bloc

Now that we have successfully installed bloc, we can create our main.dart and import the respective bloc package.

main.dart
import 'package:bloc/bloc.dart';