AmbientLight.fromLuxReadings constructor

AmbientLight.fromLuxReadings(
  1. List<num> luxValues
)

Create an AmbientLight from a list of lux value readings.

Implementation

factory AmbientLight.fromLuxReadings(List<num> luxValues) {
  var statistics = luxValues.statistics;
  return AmbientLight(
    statistics.mean,
    statistics.standardDeviation,
    statistics.min,
    statistics.max,
  );
}