Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter 2 - firebase_remote_config 0.6.0 & firebase_core ^0.7.0 version conflict

As per FlutterFire Documentation, I have updated my flutter project to Flutter 2.

I have converted my project to flutter channel beta and dependency updated as below:

enter image description here enter image description here

Unfortunately, I am getting the following error:

Because firebase_remote_config 0.6.0 depends on firebase_core ^0.7.0 and no versions of firebase_remote_config match >0.6.0 <0.7.0, firebase_remote_config ^0.6.0 requires firebase_core ^0.7.0. So, because mars_remedies depends on both firebase_core ^1.0.0 and firebase_remote_config ^0.6.0, version solving failed. pub get failed (1; So, because mars_remedies depends on both firebase_core ^1.0.0 and firebase_remote_config ^0.6.0, version solving failed.)

Note: I have also tried to use flutter channel dev but I am getting the same error.

Another Error [Updated]:

Because flutter_local_notifications_platform_interface 2.0.0+1 depends on plugin_platform_interface ^1.0.2 and no versions of flutter_local_notifications_platform_interface match >2.0.0+1 <3.0.0, flutter_local_notifications_platform_interface ^2.0.0+1 requires plugin_platform_interface ^1.0.2. So, because mars_remedies depends on both flutter_local_notifications_platform_interface ^2.0.0+1 and plugin_platform_interface ^2.0.0, version solving failed. pub get failed (1; So, because mars_remedies depends on both flutter_local_notifications_platform_interface ^2.0.0+1 and plugin_platform_interface ^2.0.0, version solving failed.)

My pubspec.yaml is:

  # For Location Information (Getting Location Details on Login or Register)
  geolocator: ^7.0.1
  geolocator_platform_interface: ^2.0.0

  flutter_local_notifications: ^4.0.1+1
  flutter_local_notifications_platform_interface: ^2.0.0+1
  plugin_platform_interface: ^2.0.0

All the above dependencies are conflicting with each other.

like image 445
Pratik Butani Avatar asked Jan 24 '23 11:01

Pratik Butani


1 Answers

Try firebase_remote_config: ^0.9.0-dev.0 instead of firebase_remote_config: ^0.6.0.

This version is not null-safe but has been created to allow compatibility with other null-safe FlutterFire packages such as firebase_core.

https://pub.dev/packages/firebase_remote_config/versions/0.9.0-dev.0

If it's still the same, try using firebase_core: ^1.0.0.

like image 151
Andrés R.C. Avatar answered May 15 '23 14:05

Andrés R.C.