khoren93 / flutter_zxing

Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
https://pub.dev/packages/flutter_zxing
MIT License
98 stars 56 forks source link

Fix for build failure on Flutter 3.11.0-16.0.pre #99

Closed giuliatesta closed 1 year ago

giuliatesta commented 1 year ago

Added handling of AppLifecycleState.hidden case according to https://docs.flutter.dev/release/breaking-changes/add-applifecyclestate-hidden#migration-guide

khoren93 commented 1 year ago

@giuliatesta Thanks!

Chappie74 commented 1 year ago

This might need to be reverted or handled differently. As @softkot mentioned this wasn't a good idea.

The current version of the package 1.4.0 which is catered to target flutter 3.7.0 minimum breaks all version prior to Flutter 3.11.0-16.0.pre

None of the below version currently build on any flutter <3.11.0-16.0.pre. image

this exception is thrown as those version don't yet have that hidden value in the enum.

image

please revert this change and publish a new version. For now I am going to fork the repo and remove the hidden case and use that in my projects.

I tested this on flutter 3.10.5 which only has 4 states, resumed, inactive, paused and detached

khoren93 commented 1 year ago

@Chappie74, we appreciate your suggestion. Kindly verify it in version v1.4.1.

Chappie74 commented 1 year ago

1.4.1 fixed the issue. Thanks.