isRectDark method

bool isRectDark(
  1. Point<double> topLeftCorner,
  2. Point<double> bottomRightCorner, {
  3. double? threshold,
})

Returns whether the given rectangular region is considered dark.

Coordinates are given in percent and must be between 0 and 1. Throws ArgumentError if the coordinates are out of range.

Implementation

bool isRectDark(
  Point<double> topLeftCorner,
  Point<double> bottomRightCorner, {
  double? threshold,
}) {
  return _getDarkness(
    linearRgbInRect(topLeftCorner, bottomRightCorner),
    threshold,
  );
}