stopCapture method
Stop capturing and release resources.
Implementation
Future<void> stopCapture() async {
try {
await _channel.invokeMethod<void>('backgroundCapture.stop');
_eventController.add(const BackgroundCaptureEvent(
paletteId: '',
type: 'stopped',
data: {},
));
} on PlatformException catch (e) {
_eventController.add(BackgroundCaptureEvent(
paletteId: '',
type: 'error',
data: {'error': e.message ?? 'Unknown error'},
));
}
}