Cannot `pub add geoflutterfire` - flutter

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

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
then
And in your case, I have tried this and it works, you can take a look a have a try

Related

flutter session version failed

This happens when i try to use the flutter_session 0.1.1, being stuck on this issue for 3 hours
Because shared_preferences_linux >=0.0.4-nullsafety <2.0.0 depends on shared_preferences_platform_interface ^2.0.0-nullsafety and shared_preferences_linux <0.0.2+1 depends on path_provider ^1.6.11, shared_preferences_linux <0.0.2+1 or >=0.0.4-nullsafety <2.0.0-∞ requires shared_preferences_platform_interface ^2.0.0-nullsafety or path_provider ^1.6.11.
And because path_provider >=1.6.4 <2.0.0-nullsafety depends on path_provider_platform_interface ^1.0.1, shared_preferences_linux <0.0.2+1 or >=0.0.4-nullsafety <2.0.0-∞ requires shared_preferences_platform_interface ^2.0.0-nullsafety or path_provider_platform_interface ^1.0.1.
And because shared_preferences_linux >=0.0.2+1 <0.0.4-nullsafety depends on path_provider_linux ^0.0.1 which depends on path_provider_platform_interface ^1.0.1, shared_preferences_linux <2.0.0 requires shared_preferences_platform_interface ^2.0.0-nullsafety or path_provider_platform_interface ^1.0.1.
And because shared_preferences >=0.5.8 <2.0.0-nullsafety depends on shared_preferences_linux ^0.0.2 and shared_preferences >=0.5.4+8 <2.0.0-nullsafety depends on shared_preferences_platform_interface ^1.0.0, shared_preferences >=0.5.8 <2.0.0-nullsafety requires path_provider_platform_interface ^1.0.1.
And because every version of flutter_session depends on shared_preferences ^0.5.8 and path_provider_platform_interface <2.0.0-nullsafety depends on plugin_platform_interface ^1.0.1, every version of flutter_session requires plugin_platform_interface ^1.0.1.
And because file_picker 5.2.2 depends on plugin_platform_interface ^2.1.2 and no versions of file_picker match >5.2.2 <6.0.0, flutter_session is incompatible with file_picker ^5.2.2.
So, because fyp depends on both file_picker ^5.2.2 and flutter_session ^0.1.1, version solving failed.
pub get failed (1; So, because fyp depends on both file_picker ^5.2.2 and flutter_session ^0.1.1, version solving failed.)
i don't understand this error and find a lot of sources on the internet but all of them are not related to this error

Package version incompatibilities

Because firebase_ui_auth >=1.0.3 depends on firebase_core ^2.1.1 and cloud_firestore >=3.1.2 <4.0.1 depends on firebase_core ^1.10.2, firebase_ui_auth >=1.0.3 is incompatible with cloud_firestore >=3.1.2 <4.0.1.
So, because "my_project" depends on both cloud_firestore ^3.4.2 and firebase_ui_auth ^1.0.3, version solving failed.
pub get failed (1; So, because "my_project" depends on both cloud_firestore ^3.4.2 and firebase_ui_auth ^1.0.3, version solving failed.)
exit code 1
How can I fix this?
Try
firebase_ui_auth: ^1.0.0-dev.0 # or ^1.0.3
firebase_core: ^1.24.0
cloud_firestore: ^3.4.9

Flutter, google_maps_flutter and webview_flutter are not match

i have webview_flutter: ^2.8.0 in my pubspec.yaml then i want to add google_maps_flutter: ^1.2.0 package but it doesn't match, can it be fix? or what other package to replace google_maps_flutter: ^1.2.0 because this is my company project and webview_flutter: ^2.8.0 is already in the pubspec.yaml from the beginning and i cannot remove it of course.
it shows something like this in output
Running "flutter pub get" in one-smile...
Because no versions of webview_flutter_platform_interface match >1.8.0 <1.8.1 and webview_flutter_platform_interface >=1.8.1 depends on plugin_platform_interface ^2.1.0, webview_flutter_platform_interface >1.8.0 requires plugin_platform_interface ^2.1.0.
And because webview_flutter_platform_interface 1.8.0 depends on plugin_platform_interface ^2.0.0, webview_flutter_platform_interface >=1.8.0 requires plugin_platform_interface ^2.0.0.
Because google_maps_flutter >=1.2.0 <2.0.0-nullsafety depends on google_maps_flutter_platform_interface ^1.2.0 which depends on plugin_platform_interface ^1.0.1, google_maps_flutter >=1.2.0 <2.0.0-nullsafety requires plugin_platform_interface ^1.0.1.
Thus, google_maps_flutter >=1.2.0 <2.0.0-nullsafety is incompatible with webview_flutter_platform_interface >=1.8.0.
And because webview_flutter 2.8.0 depends on webview_flutter_platform_interface ^1.8.0 and no versions of webview_flutter match >2.8.0 <3.0.0, google_maps_flutter >=1.2.0 <2.0.0-nullsafety is incompatible with webview_flutter ^2.8.0.
So, because onesmile depends on both webview_flutter ^2.8.0 and google_maps_flutter ^1.2.0, version solving failed.
pub get failed (1; So, because onesmile depends on both webview_flutter ^2.8.0 and google_maps_flutter ^1.2.0, version solving failed.)
exit code 1
and in debug console when i run it
Because no versions of webview_flutter_platform_interface match >1.8.0 <1.8.1 and webview_flutter_platform_interface >=1.8.1 depends on plugin_platform_interface ^2.1.0, webview_flutter_platform_interface >1.8.0 requires plugin_platform_interface ^2.1.0.
And because webview_flutter_platform_interface 1.8.0 depends on plugin_platform_interface ^2.0.0, webview_flutter_platform_interface >=1.8.0 requires plugin_platform_interface ^2.0.0.
Because google_maps_flutter >=1.2.0 <2.0.0-nullsafety depends on google_maps_flutter_platform_interface ^1.2.0 which depends on plugin_platform_interface ^1.0.1, google_maps_flutter >=1.2.0 <2.0.0-nullsafety requires plugin_platform_interface ^1.0.1.
Thus, google_maps_flutter >=1.2.0 <2.0.0-nullsafety is incompatible with webview_flutter_platform_interface >=1.8.0.
And because webview_flutter 2.8.0 depends on webview_flutter_platform_interface ^1.8.0 and no versions of webview_flutter match >2.8.0 <3.0.0, google_maps_flutter >=1.2.0 <2.0.0-nullsafety is incompatible with webview_flutter ^2.8.0.
So, because onesmile depends on both webview_flutter ^2.8.0 and google_maps_flutter ^1.2.0, version solving failed.
pub get failed (1; So, because onesmile depends on both webview_flutter ^2.8.0 and google_maps_flutter ^1.2.0, version solving failed.)
as you can see on pub.dev webview_flutter: ^2.8.0 is nearly two months old uses latest api to interact with flutter.
where your google_maps_flutter: ^1.2.0 is quite old so update it to any of below versions and it should work.

Can't install permission_handler and file_picker because of cloud_firestore

I want to get data from Firestore, put it into a list and enable to user to download data on phone in CSV format by using app.
I found two solutions how to export data to CSV file on phone, but both solutions contains packages which I can't install.
Solution #1
How to create and export csv file in flutter?
Dependencies #1
dependencies:
page_view_indicators: ^2.0.0
syncfusion_flutter_xlsio: ^19.1.64-beta
csv: ^5.0.0
ext_storage: ^1.0.3
permission_handler: ^8.0.0+1
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
Problem #1
Because cloud_firestore >=0.13.1 <0.14.0-dev.1 depends on cloud_firestore_platform_interface ^1.0.0 which depends on plugin_platform_interface ^1.0.0, cloud_firestore >=0.13.1 <0.14.0-dev.1 requires plugin_platform_interface ^1.0.0.
And because permission_handler >=8.0.0 depends on permission_handler_platform_interface ^3.5.0 which depends on plugin_platform_interface ^2.0.0, cloud_firestore >=0.13.1 <0.14.0-dev.1 is incompatible with permission_handler >=8.0.0.
So, because gamiforms depends on both permission_handler ^8.0.0+1 and cloud_firestore ^0.13.3, version solving failed.
pub get failed (1; So, because gamiforms depends on both permission_handler ^8.0.0+1 and cloud_firestore ^0.13.3, version solving failed.)
exit code 1
Solution #2
https://medium.com/flutterdevs/exploring-csv-in-flutter-fafc57b02eb1
Dependencies #2
dependencies:
page_view_indicators: ^2.0.0
syncfusion_flutter_xlsio: ^19.1.64-beta
csv: ^5.0.0
ext_storage: ^1.0.3
file_picker: ^3.0.1
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
Problem #2
Because cloud_firestore >=0.13.1 <0.14.0-dev.1 depends on cloud_firestore_platform_interface ^1.0.0 which depends on plugin_platform_interface ^1.0.0, cloud_firestore >=0.13.1 <0.14.0-dev.1 requires plugin_platform_interface ^1.0.0.
And because file_picker >=3.0.0-nullsafety.3 depends on plugin_platform_interface ^2.0.0, cloud_firestore >=0.13.1 <0.14.0-dev.1 is incompatible with file_picker >=3.0.0-nullsafety.3.
So, because gamiforms depends on both file_picker ^3.0.1 and cloud_firestore ^0.13.3, version solving failed.
pub get failed (1; So, because gamiforms depends on both file_picker ^3.0.1 and cloud_firestore ^0.13.3, version solving failed.)
exit code 1
How to fix one of these problems or is there any another way how to export data to phone via app?
I've never done this before and every advice is welcome.
EDIT
dev_dependencies:
flutter_test:
sdk: flutter
cached_network_image: ^2.0.0
cloud_firestore: ^0.13.3
firebase_auth: ^0.15.2
provider: ^3.2.0
#google_sign_in: ^4.1.1
shared_preferences: ^0.5.6+3
random_string: ^2.0.1
In both the cases, you cloud_firestore is way too old. I see that the current version is
cloud_firestore: ^2.2.0
So, unless there is some problem with this version, you should migrate it to the latest version, which should be depending on a later version of plugin_platform_interface
cloud_firestore: ^2.2.0 depends on cloud_firestore_platform_interface: ^5.1.0 which depends on plugin_platform_interface: ^2.0.0.
So, change your pubsec.yaml file to have,
cloud_firestore: ^2.2.0
Then run, flutter pub get.

pub get failed: Because flutter_google_places >=0.2.5 depends on rxdart ^0.24.0 on rxdart ^0.23.1,

I am trying to build a flutter application and want to use flutter_google_places dependency in it but it is showing me this following error:
Because flutter_google_places >=0.2.5 depends on rxdart ^0.24.0 and flutter_google_places >=0.2.4 <0.2.5 depends on rxdart ^0.23.1, flutter_google_places >=0.2.4 requires rxdart ^0.23.1 or ^0.24.0.
Can someone help me with this please?
You can either upgrade the rxDart package.
rxdart: ^0.25.0
Or, Downgrade the flutter_google_places package to 0.2.4.
flutter_google_places: ^0.2.4