mobile_scanner icon indicating copy to clipboard operation
mobile_scanner copied to clipboard

Dependency issue with mobile_scanner 5.0.0-beta.2 and web ^0.5.1

Open PROJASO opened this issue 1 year ago • 3 comments

Hello,

I have been using 'mobile_scanner 4.0.1' in my Flutter project and it has been working well. I wanted to try out 'mobile_scanner 5.0.0-beta.2' to manually handle the lifecycle. However, I'm encountering a dependency issue when I add 'mobile_scanner 5.0.0-beta.2' to my project. The error message I receive is as follows:

"Resolving dependencie … And because firebase_core_web 2.12.0 depends on web ^0.5.1 and mobile_scanner >=5.0.0-beta.2 depends on web ^0.4.0, firebase_crashlytics ^3.4.19 is incompatible with mobile_scanner >=5.0.0-beta.2"

From my understanding, both firebase_core_web and mobile_scanner should work with web ^0.5.1 as long as it's less than '1.0.0'. Could you please help me understand why this conflict is occurring?

Thanks in advance

PROJASO avatar Mar 21 '24 18:03 PROJASO

The issue is caused by the fact that this commit downgrades the version of the web package.

https://github.com/juliansteenbakker/mobile_scanner/commit/382a8b6de4324aedf932bfb0b5255c3179f4ab7a#diff-8b7e9df87668ffa6a04b32e1769a33434999e54ae081c52e5d943c541d4c0d25R28

The issue does not occur in version 5.0.0-beta.1

mobile_scanner: 5.0.0-beta.1

utamori avatar Mar 25 '24 01:03 utamori

@utamori is right here. Should we encourage users to upgrade to Flutter 3.19.0 when using mobile_scanner 5.0.0 ?

navaronbracke avatar Mar 29 '24 12:03 navaronbracke

I'm not familiar with Flutter Web, but I've heard that Dart 3.3 has some breaking changes for Flutter Web.

For example, http package is now mandatory for Dart 3.3 and web v5 with minor version upgrades https://pub.dev/packages/http/changelog#121

Same with firebase_core_web, etc.

That makes me think that mobile_scanner requiring Dart 3.3 and web v5 in a major version upgrade is not a problem.

utamori avatar Mar 29 '24 15:03 utamori