New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(bloc): Add const constructor to BlocObserver
#3704
refactor(bloc): Add const constructor to BlocObserver
#3704
Conversation
Should I do a first PR to add the const constructor and only modify the examples once released? |
@@ -3,6 +3,9 @@ import 'package:meta/meta.dart'; | |||
|
|||
/// An interface for observing the behavior of [Bloc] instances. | |||
abstract class BlocObserver { | |||
/// An interface for observing the behavior of [Bloc] instances. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create a template and use a macro here instead of copy/pasting the same documentation?
runApp(const App()); | ||
} | ||
|
||
/// Custom [BlocObserver] that observes all bloc and cubit state changes. | ||
class AppBlocObserver extends BlocObserver { | ||
/// Custom [BlocObserver] that observes all bloc and cubit state changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create a template and use a macro here to avoid duplicating the documentation?
runApp(const App()); | ||
} | ||
|
||
/// Custom [BlocObserver] that observes all bloc and cubit state changes. | ||
class AppBlocObserver extends BlocObserver { | ||
/// Custom [BlocObserver] that observes all bloc and cubit state changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create a template and use a macro here to avoid duplicating the documentation?
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #3704 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 8 +5
Lines 158 198 +40
=========================================
+ Hits 158 198 +40
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
eb52280
to
c6e6e54
Compare
@felangel I reverted the changes on the other packages than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks so much for the contribution! 💯
Status
READY
Breaking Changes
NO
Description
Fixes #3703 by adding a const constructor to
BlocObserver
Type of Change