I have this problem when I try to do flutter pub get. How to solve this problem?

Viewed 1602

I created a new flutter project where I put the flutter_bloc dependency but when I do flutter pub get I have this error.

[bloc] flutter pub get Running "flutter pub get" in bloc...
Because bloc depends on flutter_bloc ^6.0.1 which depends on bloc ^6.0.0, bloc ^6.0.0 is required.

So, because bloc is 1.0.0+1, version solving failed. pub get failed (1; So, because bloc is 1.0.0+1, version solving failed.) exit code 1 can someone help me please?

Mon fichier pubspec.yaml

2 Answers

I solved my problem because I created the project with the name block and it created conflicts with flutter_bloc. Thanks to those who bothered to read my question

You can fix this bug by changing versions of a package which you need in the app. I have a problem with flutter_bloc: 7.0.1 and bloc: 7.0.1 versions and just add

flutter_bloc: any

bloc: any
Related