changeTypeScan method
Implementation
Future<void> changeTypeScan(TypeScan type) async {
if (state.value.typeScan == type) {
return;
}
if (type == TypeScan.live) {
cameraController?.startImageStream(_imageStream);
} else {
await cameraController?.stopImageStream();
}
state.value = state.value.copyWith(
processing: false,
typeScan: type,
);
}