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(flutter_bloc)!: remove package:provider #1880
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1880 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 17 8 -9
Lines 282 172 -110
==========================================
- Hits 282 172 -110
Continue to review full report at Codecov.
|
61e5dc5
to
9599318
Compare
9599318
to
d29dd02
Compare
โฆngel/bloc into refactor/remove-provider-dependency
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.
๐ข ๐ฎ๐น
Status
READY
Breaking Changes
YES
Explanation
This refactor technically is a breaking change because previously it was possible to use
Provider.of
andcontext.read
with bloc/cubit instances. In addition, it was previously possible to importpackage:provider/provider.dart
as a transitive dependency.Migration
Provider.of<MyBloc>(context, listen: ...)
->BlocProvider.of<MyBloc>(context)
context.read<MyBloc>()
->context.bloc<MyBloc>()
If you were previously importing
package:provider/provider.dart
please ensure it is a direct dependency by adding it to the dependencies section of yourpubspec.yaml
Description
package:provider
frompackage:flutter_bloc
(closes [Discussion] Maintaining Provider Dependencyย #712)Feedback Wanted
You can give these changes a try by updating your
pubspec.yaml
There should be no noticeable difference or breaking changes unless you are using
Provider.of
orcontext.read
to interact with bloc/cubit instances.If you experience any issues please leave a comment describing the problem, thanks! ๐
Type of Change