stopPreview method

Future<bool> stopPreview()

暂停预览 stop Preview

Implementation

Future<bool> stopPreview() async {
  assert(_isInitialize, 'Call initialize first');
  if (cameraOptions.value == null) return false;
  final bool? state = await _channel.invokeMethod<bool?>('stopPreview');
  if (state == true) cameraOptions.value = null;
  return state ?? false;
}