Closed MinaSamirCap closed 4 years ago
Use dependency overrides https://dart.dev/tools/pub/dependencies#dependency-overrides
I had already tried that but it fails because the flutter pub get can not find a convenient version between the graphql_flutter and http_middleware packages.
the first one requires http ^0.12.0+4 second one requires http ^0.11.3+16
if you try to use dependency_overrides like this dependency_overrides: http: ^0.11.3+16 or this dependency_overrides: http: ^0.12.0+4
you will get the following error in both cases no versions of graphql match >3.1.0 <4.0.0, graphql ^3.1.0 requires http ^0.12.0+4. because http_middleware >=1.0.0 depends on http ^0.11.3+16 and finally version solving failed.
this is my pubspec.yaml --> if you want to have a look on it and all repo https://github.com/BeshoyMelika/mmd-ecommerce-fl-lib/blob/master/pubspec.yaml
Here is your fix
example/pubspec - https://tppr.me/9NjqD pubspec - https://tppr.me/2bpVT
I really appreciate your effort with me -- but still not working .. kindly check the screenshot you will find all dependency together and the error with them.
There are two pubspec
files required to be modified.
in project
root and in example
root
Really I am grateful for your help --> thank you very much I did not notice that I must update both files of pubspec.yaml. it is new info for me. so, thanks and thanks and thanks
Unfortunately, the http_logger will not fit with my project so I decided to make the logger by my self, and I used this library as a reference https://github.com/azamat-murzagalin/http_ui_logger
Again and again, thank you very much.
I tried to add http_logger package to my project and it asked to add http_middleware package. https://pub.dev/packages/http_logger https://pub.dev/packages/http_middleware I got this error
Because graphql 3.1.0 depends on http ^0.12.0+4 and no versions of graphql match >3.1.0 <4.0.0, graphql ^3.1.0 requires http ^0.12.0+4. And because http_middleware >=1.0.0 depends on http ^0.11.3+16, http_middleware >=1.0.0 is incompatible with graphql ^3.1.0. And because graphql_flutter 3.1.0 depends on graphql ^3.1.0 and no versions of graphql_flutter match >3.1.0 <4.0.0, http_middleware >=1.0.0 is incompatible with graphql_flutter ^3.1.0. So, because mmd_ecommerce_fl_lib depends on both graphql_flutter ^3.1.0 and http_middleware ^1.0.0, version solving failed. pub get failed (1; So, because mmd_ecommerce_fl_lib depends on both graphql_flutter ^3.1.0 and http_middleware ^1.0.0, version solving failed.)
I need a way to use the http_logger or if the library uses another way to log request kindly let me know