Getting Started
Packages
Section titled “Packages”The bloc ecosystem consists of multiple packages listed below:
Package | Description | Link |
---|---|---|
angular_bloc | AngularDart Components | |
bloc | Core Dart APIs | |
bloc_concurrency | Event Transformers | |
bloc_lint | Custom Linter | |
bloc_test | Testing APIs | |
bloc_tools | Command-line Tools | |
flutter_bloc | Flutter Widgets | |
hydrated_bloc | Caching/Persistence Support | |
replay_bloc | Undo/Redo Support |
Installation
Section titled “Installation”# Add bloc to your project.dart pub add bloc
# Add flutter_bloc to your project.flutter pub add flutter_bloc
# Add angular_bloc to your project.dart pub add angular_bloc
Imports
Section titled “Imports”Now that we have successfully installed bloc, we can create our main.dart
and
import the respective bloc
package.
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:angular_bloc/angular_bloc.dart';