Home > Enterprise >  Cannot `pub add geoflutterfire`
Cannot `pub add geoflutterfire`

Time:02-04

I could not manage to add the geoflutterfire module.

I don't really understand what I should do as I just upgraded all modules with flutter pub upgrade.

Here is what I get:

 flutter pub add geoflutterfire
    Because cached_network_image >=3.2.0 depends on flutter_cache_manager ^3.3.0 which depends on rxdart >=0.26.0 <0.28.0, cached_network_image >=3.2.0 requires rxdart >=0.26.0 <0.28.0.
    Because geoflutterfire >=2.0.3 3 <2.0.3 7 depends on rxdart ^0.22.0 and geoflutterfire <2.0.3 3 depends on rxdart ^0.20.0, geoflutterfire <2.0.3 7 requires rxdart ^0.20.0 or ^0.22.0.
    Thus, cached_network_image >=3.2.0 is incompatible with geoflutterfire <2.0.3 7.
    And because geoflutterfire >=3.0.0-nullsafety.3 <3.0.2 depends on rxdart ^0.27.0 and geoflutterfire >=2.2.3 <3.0.0-nullsafety.1 depends on rxdart ^0.27.3, if cached_network_image >=3.2.0 and geoflutterfire <2.0.3 7 or >=2.2.3 <3.0.0-nullsafety.1 or >=3.0.0-nullsafety.3 <3.0.2-∞ then rxdart ^0.27.0.
    And because geoflutterfire >=2.2.2 <2.2.3 depends on cloud_firestore ^0.16.0 and geoflutterfire >=2.2.1 <2.2.2 depends on cloud_firestore ^0.14.0 2, if cached_network_image >=3.2.0 and geoflutterfire <2.0.3 7 or >=2.2.1 <3.0.0-nullsafety.1 or >=3.0.0-nullsafety.3 <3.0.2-∞ then rxdart ^0.27.0 or cloud_firestore ^0.14.0 2 or ^0.16.0.
(1) So, because geoflutterfire >=2.0.3 6 <2.2.1 depends on cloud_firestore ^0.13.0 1 and geoflutterfire >=3.0.0-nullsafety.1 <3.0.0-nullsafety.3 depends on cloud_firestore ^1.0.0, if cached_network_image >=3.2.0 and geoflutterfire <3.0.2 then rxdart ^0.27.0 or cloud_firestore ^0.13.0 1 or ^0.14.0 2 or ^0.16.0 or ^1.0.0.

    Because geoflutterfire >=3.0.0-nullsafety.1 <3.0.0-nullsafety.3 depends on rxdart ^0.26.0 and geoflutterfire >=3.0.0-nullsafety.3 <3.0.1 depends on cloud_firestore ^2.0.0, geoflutterfire >=3.0.0-nullsafety.1 <3.0.1 requires rxdart ^0.26.0 or cloud_firestore ^2.0.0.
    And because geoflutterfire <2.0.3 3 depends on rxdart ^0.20.0, geoflutterfire <2.0.3 3 or >=3.0.0-nullsafety.1 <3.0.1-∞ requires rxdart ^0.20.0 or ^0.26.0 or cloud_firestore ^2.0.0.
    And because geoflutterfire >=2.0.3 3 <2.0.3 7 depends on rxdart ^0.22.0 and geoflutterfire >=2.0.3 7 <2.2.1 depends on rxdart ^0.23.1, geoflutterfire <2.2.1-∞ or >=3.0.0-nullsafety.1 <3.0.1-∞ requires rxdart ^0.20.0 or ^0.22.0 or ^0.23.1 or ^0.26.0 or cloud_firestore ^2.0.0.
    And because geoflutterfire >=2.2.1 <2.2.2 depends on rxdart ^0.24.1 and geoflutterfire >=2.2.2 <2.2.3 depends on rxdart ^0.25.0, geoflutterfire <2.2.3-∞ or >=3.0.0-nullsafety.1 <3.0.1-∞ requires rxdart ^0.20.0 or ^0.22.0 or ^0.23.1 or ^0.24.1 or ^0.25.0 or ^0.26.0 or cloud_firestore ^2.0.0.
    And because geoflutterfire >=2.2.3 <3.0.0-nullsafety.1 depends on cloud_firestore ^3.1.6 and geoflutterfire >=3.0.1 <3.0.2 depends on cloud_firestore ^2.3.0, geoflutterfire <3.0.2 requires rxdart ^0.20.0 or ^0.22.0 or ^0.23.1 or ^0.24.1 or ^0.25.0 or ^0.26.0 or cloud_firestore >=2.0.0 <3.0.0 or ^3.1.6.
    And because if cached_network_image >=3.2.0 and geoflutterfire <3.0.2 then rxdart ^0.27.0 or cloud_firestore ^0.13.0 1 or ^0.14.0 2 or ^0.16.0 or ^1.0.0 (1), if cached_network_image >=3.2.0 and geoflutterfire <3.0.2 then cloud_firestore ^0.13.0 1 or ^0.14.0 2 or ^0.16.0 or ^1.0.0 or >=2.0.0 <3.0.0 or ^3.1.6.
    And because geoflutterfire >=3.0.2 depends on cloud_firestore ^3.1.6 and shokaze depends on cloud_firestore ^4.2.0, cached_network_image >=3.2.0 is incompatible with geoflutterfire.
    So, because shokaze depends on both cached_network_image ^3.2.3 and geoflutterfire any, version solving failed.
pub finished with exit code 65

CodePudding user response:

This might because there are some constraints between two or more packages as you read from this message.

So, one way to resolve this is to downgrade some of these packages and then use dependency_overrides in pubspec.yaml to use the higher version.

There is a sample in my project, some packages have constraints with flutter_svg, then in the dependencies I use the lower version and then in dependency_overrides I use the high version

dependencies

then

overrides

And in your case, I have tried this and it works, you can take a look a have a try

for you :3

  • Related