Flutter simple_slider installation problem - flutter

flutter_cache_manager and cached_network_image is successfully instaled.
flutter_cache_manager: ^1.1.3
cached_network_image: ^1.1.3
When try install simple_slider: ^0.0.2 get below error
Because every version of simple_slider depends on cached_network_image ^0.4.1 and first_flutter_app depends on cached_network_image ^1.1.3, simple_slider is forbidden.
So, because first_flutter_app depends on simple_slider ^0.0.2, version solving failed.
pub get failed (1)

try:
simple_slider: any
hope it helped

Related

Flutter firebase - update packeges

I try to update firebase to nullsafe.
Here is my pubspec:
firebase_core: "^0.7.0"
firebase_auth: "^0.20.1"
firebase_crashlytics: "^0.4.0+1"
cloud_firestore: "^0.16.0+1"
cloud_functions: "^0.9.0"
firebase_storage: "^7.0.0"
firebase_messaging: "^8.0.0-dev.15"
firebase_remote_config: "^0.8.0-dev.0"
firebase_analytics: "^7.0.1"
firebase_database: "^6.0.0"
firebase_dynamic_links: "^0.7.0+1"
firebase_in_app_messaging: "^0.3.0+1"
firebase_performance: "^0.5.0+1"
But I can't do it because have an errors:
Because firebase_remote_config >=0.8.0-dev.0 <0.9.0-dev.0 depends on firebase_remote_config_platform_interface ^0.1.0-dev.0 which depends on firebase_core ^0.5.2, firebase_remote_config >=0.8.0-dev.0 <0.9.0-dev.0 requires firebase_core ^0.5.2.
So, because EMA depends on both firebase_core ^0.7.0 and firebase_remote_config ^0.8.0-dev.0, version solving failed.
Flutter Firebase dependency hell !!!
What to do?
Please show guaranteed working plugins firebase pluging(storage,auth,store,crashlitics)
You are getting version conflicts. You can solve them by letting pub find the version that is compatible with your other dependencies. Like this:
firebase_remote_config: any
If you get more of these errors, I suggest you to put all of packages to any then run flutter pub get and finally look in the pubspec.lock file and see what versions you got. Now you can put those versions in pubspec.yaml.

flutter pub get error when i edit my pubspec.yaml file

I have an error when i try to add a new plugin in my pubspec.yaml
i add the plugin : easy_localization: ^3.0.0
And i have this error message :
Because flutter_launcher_icons >=0.7.0 <0.9.0 depends on args ^1.5.0 and easy_localization >=3.0.0-nullsafety depends on args ^2.0.0, flutter_launcher_icons >=0.7.0 <0.9.0 is incompatible with easy_localization >=3.0.0-nullsafety.
So, because gameapp depends on both easy_localization ^3.0.0 and flutter_launcher_icons ^0.8.0, version solving failed.
pub get failed (1; So, because gameapp depends on both easy_localization ^3.0.0 and flutter_launcher_icons ^0.8.0, version solving failed.)
Could you try adding,
flutter_launcher_icons: ^0.9.0
args: ^2.0.0
easy_localization: ^3.0.0-nullsafety
to your pubspec.yaml and try saving it again to reload the packages?
The problem is: The library version you want to use is newer than Flutter, and there are two solutions
1: Go to the library website and click on the version and install an old library, for example (easy_localization: ^ 2.3.3)
2: Install the latest version of Flutter. Flutter2

How to resolve version solving failed in flutter

Because flutter_bloc: 0.21.0 depends on provider: ^3.0.0 and no versions of flutter_bloc match: >0.21.0 <0.22.0, flutter_bloc: ^0.21.0 requires provider: ^3.0.0.
So, because it tells_me that it depends on both provider: ^4.1.2 and flutter_bloc: ^0.21.0, version solving failed.
pub get failed (1; So, because tellz_me depends on both provider ^4.1.2 and flutter_bloc ^0.21.0, version solving failed.)
you need to use dependency override.
this code is from my project, so path provider was the problem, you need to find the package that makes. the conflict and put it inside the dependency_overrides
this will fix your problem.
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
file_picker: ^3.0.0
hive: ^2.0.0
hive_flutter: ^1.0.0
dependency_overrides:
path_provider: 2.0.1
See this:
https://stackoverflow.com/a/67517680/13500457
And how to update the dependencies automatically:
https://stackoverflow.com/a/66759292/13500457
I would suggest you to remove all dependencies and run pub get and add the dependencies using the command method, not by copy pasting. See this or mentioned above:
https://stackoverflow.com/a/67517680/13500457
I hope it helps, happy coding!

flutter_plugin_pdf_viewer >=1.0.4 is forbidden

I'm installing 2 packages: rxdart and flutter_plugin_pdf_viewer
rxdart: ^0.23.1
flutter_plugin_pdf_viewer: ^1.0.7
but flutter_plugin_pdf_viewer >=1.0.4 is forbidden.
and this is error message:
Because flutter_plugin_pdf_viewer >=1.0.4 depends on rxdart ^0.21.0 and flutterattendancesystem depends on rxdart ^0.23.1, flutter_plugin_pdf_viewer >=1.0.4 is forbidden.
So, because flutterattendancesystem depends on flutter_plugin_pdf_viewer ^1.0.7, version solving failed.
pub upgrade failed (1; So, because flutterattendancesystem dep
ends on flutter_plugin_pdf_viewer ^1.0.7, version solving failed.)
Look at this thread https://github.com/CrossPT/flutter_plugin_pdf_viewer/issues/59
This repo is not maintained properly,
You can use a different package for pdf viewer.
or for a temporary fix do a following
Manually edit the pubspec.yaml in flutter_plugin_pdf_viewer-1.0.7 folder in .pub-cache and set rxdart: ^0.21.0 to rxdart: ^0.23.1.
In flutter_plugin_pdf_viewer-1.07/lib/src/document.dart at line no: 89, changed Observable to Stream.

version solving failed when try get pubspec.yaml

I facing issue that show up to me that message when Trying to get packages
Running "flutter pub get" in stok_app_a...
Because no versions of in_app_purchase match >0.2.2+4 <0.3.0 and in_app_purchase 0.2.2+4 depends on json_annotation ^2.0.0, in_app_purchase ^0.2.2+4 requires json_annotation ^2.0.0.
And because every version of speech_to_text depends on json_annotation
^3.0.0, in_app_purchase ^0.2.2+4 is incompatible with speech_to_text.
So, because stok_app_a depends on both speech_to_text ^0.7.0 and
in_app_purchase ^0.2.2+4, version solving failed. pub get failed (1;
So, because stok_app_a depends on both speech_to_text ^0.7.0 and
in_app_purchase ^0.2.2+4, version solving failed.) exit code 1
I solved this issue by assignment dependency_overrides in pubspec.yaml file like that
dependency_overrides:
json_annotation: ^2.0.0
to override the json_annotation 2.0.0