Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Auto Lifecycle Toggle Feature #861

Closed
wants to merge 3 commits into from
Closed

feat: Add Auto Lifecycle Toggle Feature #861

wants to merge 3 commits into from

Conversation

itsSagarBro
Copy link

Description

This pull request introduces a new feature to the mobile_scanner Flutter plugin - Auto Lifecycle Toggle. The feature allows automatic toggling of the scanner's lifecycle based on the state of the Flutter widget, enhancing the plugin's usability and integration into various Flutter applications.

Changes Made

  • Added a new feature: Auto Lifecycle Toggle
  • Implemented logic for automatic toggling of the scanner's lifecycle
  • Updated documentation to reflect the new feature

Usage

To enable the Auto Lifecycle Toggle feature, developers can set the corresponding parameter when initializing the scanner. This feature helps in seamlessly managing the scanner's lifecycle without manual intervention.

Example

MobileScanner(
  autoLifecycle: false,
  onDetect: (barcodes) {},
)

Testing

Describe the testing process you followed to ensure the reliability and correctness of the new feature.

Checklist

✅ Added tests
✅ Followed the code style guidelines
✅ Checked compatibility with the latest Flutter version

@itsSagarBro itsSagarBro changed the title Add Auto Lifecycle Toggle Feature feat: Add Auto Lifecycle Toggle Feature Nov 15, 2023
@navaronbracke
Copy link
Collaborator

@itsSagarBro This won't be needed, as we will remove the lifecycle handling (start/stop) from the MobileScanner widget in the next major release. I do agree that the current implementation causes issues (i.e. during reparenting in the widget tree).

@itsSagarBro itsSagarBro closed this by deleting the head repository Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants