stopPreview method

Future<bool> stopPreview()

暂停预览 stop Preview

Implementation

Future<bool> stopPreview() async {
  if (_cameraOptions == null) return false;
  final bool? state = await channel.invokeMethod<bool?>('stopPreview');
  if (state == true) {
    _cameraOptions = null;
    notifyListeners();
  }
  return state ?? false;
}