Showing
1 changed file
with
10 additions
and
0 deletions
| @@ -46,6 +46,16 @@ class MobileScannerWeb extends MobileScannerPlatform { | @@ -46,6 +46,16 @@ class MobileScannerWeb extends MobileScannerPlatform { | ||
| 46 | @override | 46 | @override |
| 47 | Stream<BarcodeCapture?> get barcodesStream => _barcodesController.stream; | 47 | Stream<BarcodeCapture?> get barcodesStream => _barcodesController.stream; |
| 48 | 48 | ||
| 49 | + @override | ||
| 50 | + Stream<TorchState> get torchStateStream => _settingsController.stream.map( | ||
| 51 | + (settings) => settings.torch ? TorchState.on : TorchState.off, | ||
| 52 | + ); | ||
| 53 | + | ||
| 54 | + @override | ||
| 55 | + Stream<double> get zoomScaleStateStream => _settingsController.stream.map( | ||
| 56 | + (settings) => settings.zoom.toDouble(), | ||
| 57 | + ); | ||
| 58 | + | ||
| 49 | void _handleMediaTrackSettingsChange(MediaTrackSettings settings) { | 59 | void _handleMediaTrackSettingsChange(MediaTrackSettings settings) { |
| 50 | if (_settingsController.isClosed) { | 60 | if (_settingsController.isClosed) { |
| 51 | return; | 61 | return; |
-
Please register or login to post a comment