setFocusPoint method

  1. @override
Future<void> setFocusPoint(
  1. int cameraId,
  2. Point<double>? point
)

Sets the focus point for automatically determining the focus values.

Supplying null for the point argument will result in resetting to the original focus point value.

Implementation

@override
Future<void> setFocusPoint(int cameraId, Point<double>? point) {
  assert(point == null || point.x >= 0 && point.x <= 1);
  assert(point == null || point.y >= 0 && point.y <= 1);

  return _channel.invokeMethod<void>(
    'setFocusPoint',
    <String, dynamic>{
      'cameraId': cameraId,
      'reset': point == null,
      'x': point?.x,
      'y': point?.y,
    },
  );
}