setCameraFocusPositionInPreview method

Future<int> setCameraFocusPositionInPreview(
  1. double x,
  2. double y
)

ZH

在指定点区域对焦 @param x @param y @return 0: 成功, 非0: 失败

EN

Focus on specified point area @param x @param y @return 0: success, non-zero: failure

Implementation

Future<int> setCameraFocusPositionInPreview(double x, double y) async {
  Map<String, dynamic> arguments = {'x': x, 'y': y};
  int code =
      await _channel.invokeMethod(
        'setCameraFocusPositionInPreview',
        arguments,
      ) ??
      -1;
  return code;
}