FaceDetector constructor

FaceDetector(
  1. {@required int width,
  2. @required int height,
  3. int maxFaces = 1}
)

Creates a FaceDetector, configured with the size of the images to be analyzed and the maximum number of faces that can be detected.

These parameters cannot be changed once the object is constructed. Note that the width of the image must be even.

See: https://developer.android.com/reference/android/media/FaceDetector#FaceDetector(int,%20int,%20int)

Implementation

FaceDetector({@required this.width, @required this.height, this.maxFaces = 1})
    : assert(width != null && width > 0 && width % 2 == 0),
      assert(height != null && height > 0);