Flutter pub get constraints

221 Views Asked by At

I'm working on a flutter project and I need these dependencies in my pubspec.yaml :

firebase_core : ^0.5.3
firebase_database : ^4.4.0
firebase_auth: ^0.8.0

And I get this error :

Because firebase_auth >=0.8.0+1 <0.10.0 depends on firebase_core ^0.3.0 and firebase_auth >=0.6.5 <=0.8.0 depends on firebase_core ^0.2.5+1, firebase_auth >=0.6.5 <0.10.0 requires firebase_core ^0.2.5+1 or ^0.3.0.
So, because corona_app depends on both firebase_core ^0.5.3 and firebase_auth ^0.8.0, version solving failed.
pub get failed (1; So, because corona_app depends on both firebase_core ^0.5.3 and firebase_auth ^0.8.0, version solving failed.)

I followed the instructions, only to get another issue. Following which I get another.

Please help

2

There are 2 best solutions below

0
On BEST ANSWER

Try this

firebase_core : any
firebase_database : any
firebase_auth: any
0
On

Just try to update your firebase_auth untill it works again with the firebase_core package:

This would be the latest version before null safety:

firebase_core: "^0.7.0"
firebase_database: "^6.0.0"
firebase_auth: "^0.20.1"