Kássio Oliveira 6d8b5b289f
Refactor ScanPage for better performance and memory management (#9464)
- Added null checks in `reassemble` method to avoid potential null pointer exceptions when pausing/resuming the camera.
- Refactored image picking and QR code decoding process to use async/await, avoiding UI blocking with synchronous file reads.
- Improved exception handling by making it more specific to QR code reading errors.
- Introduced `StreamSubscription` for the QR scan listener and ensured proper cancellation in `dispose` method to prevent memory leaks.
- Separated button building logic (`_buildImagePickerButton`, `_buildFlashToggleButton`, `_buildCameraSwitchButton`) to enhance code readability and maintainability.
2024-09-26 10:34:12 +08:00
..