brianegan / brianegan/flutter_architecture_samples
bloc_library example: dependency between BLoC classes
- Dominant language
- Dart
- Stars
- 8.9k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
[`bloc_library`](https://github.com/brianegan/flutter_architecture_samples/tree/main/bloc_library) example contains direct dependency between `FilteredTodosBloc` and `TodosBloc`. It is directly not recommended in BLoC library [documentation](https://bloclibrary.dev/architecture/#bloc-to-bloc-communication). Please fix it.
https://github.com/brianegan/flutter_architecture_samples/blob/d898d1329e04e5b5fbdef1285b39ef975a6b8efa/bloc_library/lib/blocs/filtered_todos/filtered_todos_bloc.dart#L12-L25
Contributor guide
Research direction
Start with bloc_library/lib/blocs/filtered_todos/filtered_todos_bloc.dart at the linked dependency and read the BLoC-to-BLoC communication guidance in the linked documentation. Trace how FilteredTodosBloc currently obtains data from TodosBloc, then refactor the example to remove that direct dependency while preserving filtered-todo behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100