flutterdartflutter-dependenciesrazorpayflutter-razorpay

Flutter: Compatibility issue between razorpay_flutter 1.3.4 and package_info_plus plugin


I am facing a compatibility issue in my Flutter project. I am using the package_info_plus plugin with version 1.4.3+1 and razorpay_flutter plugin with version 1.3.4. However, when I added the package_info_plus plugin with version 4.0.1, I encountered the following error during the dependency resolution:

flutter pub get Resolving dependencies... Because razorpay_flutter 1.3.4 depends on package_info_plus ^1.3.0 and no versions of razorpay_flutter match >1.3.4 <2.0.0, razorpay_flutter ^1.3.4 requires package_info_plus ^1.3.0. So, because my_project depends on both razorpay_flutter ^1.3.4 and package_info_plus ^4.0.1, version solving failed. exit code 1

I have already checked the Flutter doctor, performed a flutter clean, and ran flutter pub get, but the issue persists.

Unfortunately, there is an open issue on the GitHub repository of the razorpay_flutter plugin regarding this problem: It appears that the issue has been unresolved for quite some time, with several other long-standing issues remaining open as well.

GithubRepoIssue.

I would appreciate any assistance in resolving this compatibility issue. Thank you.

I tried using the package_info_plus plugin with version 4.0.1 alongside the razorpay_flutter plugin with version 1.3.4 in my Flutter project. However, during the dependency resolution process, I encountered an error indicating a version conflict between these two plugins.

I expected that updating the package_info_plus plugin to version 4.0.1 would work seamlessly with the razorpay_flutter plugin. However, due to the specific version constraints specified in the razorpay_flutter plugin (requiring package_info_plus ^1.3.0), the version conflict prevented successful resolution of dependencies.

I have also checked for any relevant updates or fixes in the documentation, GitHub repositories, and other online resources, but unfortunately, I couldn't find any direct solutions or workarounds to address this specific compatibility issue.

If anyone has encountered a similar problem or has any suggestions on how to resolve this compatibility issue between razorpay_flutter 1.3.4 and package_info_plus 4.0.1, I would greatly appreciate your insights. Thank you.


Solution

  • You can try overriding the dependency in pubspec.yaml until the issue is resolved

    dependency_overrides:
      package_info_plus: 4.0.1