Core Dependencies
1. Add the dependencies
In the note_app/modules/domain/
directory, include the following dependencies in the pubspec.yaml
:
dependencies:
codenic_bloc_use_case: {{LATEST_VERSION}}
codenic_exception_converter: {{LATEST_VERSION}}
Here's an overview of the packages:
codenic_bloc_use_case Provides a suite of class templates extending BLoC Cubits that we can use to make our Use Cases.
codenic_exception_converter This package offers a base
Failure
class that we will extend to create custom Failure classes. In addition, this provides a utility for converting exceptions intoFailure
objects.
Fetch the dependencies:
flutter pub get modules/domain
2. Add the shared dependencies to the barrel file
On the note_app/modules/domain/lib/domain.dart
barrel file, export the packages to share them with the dependent modules:
export 'package:codenic_bloc_use_case/codenic_bloc_use_case.dart';
export 'package:codenic_exception_converter/codenic_exception_converter.dart';
Last updated